Commit Graph

6 Commits

Author SHA1 Message Date
YeonGyu-Kim
715756b68a Optimize tool descriptions for token efficiency (#73)
* Optimize background-task tool descriptions for token efficiency

- BACKGROUND_TASK_DESCRIPTION: 571 chars → 127 chars
- BACKGROUND_OUTPUT_DESCRIPTION: 268 chars → 95 chars
- BACKGROUND_CANCEL_DESCRIPTION: 374 chars → 83 chars

Follows token efficiency improvements pattern from PR #71.

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)

* Optimize call-omo-agent tool description for token efficiency

- CALL_OMO_AGENT_DESCRIPTION: 841 chars → 156 chars (~81% reduction)
- Follows pattern from PR #71 where LSP tool descriptions were optimized
- Maintains core information while removing redundant explanations

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)

* Optimize look-at tool description for token efficiency

🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)

* Optimize interactive-bash tool description for token efficiency

346 chars → 130 chars (~62% reduction), following PR #71 pattern.

🤖 Generated with assistance of OhMyOpenCode
2025-12-17 00:38:38 +09:00
YeonGyu-Kim
9b2048b3e8 feat(interactive-bash): block tmux output capture commands
Block capture-pane, save-buffer, show-buffer, pipe-pane and their
aliases in interactive_bash tool. Guide users to use bash tool instead
for terminal output capture operations.

- Add BLOCKED_TMUX_SUBCOMMANDS list in constants.ts
- Add input validation in tools.ts to reject blocked commands
- Update tool description with blocked commands documentation

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-15 23:01:02 +09:00
YeonGyu-Kim
153fa844d4 Add tmux availability check for conditional interactive_bash tool registration
- Implement getTmuxPath() utility to detect tmux availability at plugin load time
- Add getCachedTmuxPath() for retrieving cached tmux path
- Add startBackgroundCheck() for asynchronous tmux detection
- Conditionally register interactive_bash tool only when tmux is available
- Silently skip registration without error messages if tmux not found
- Export utilities from tools/interactive-bash/index.ts

Tool now gracefully handles systems without tmux installed.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-15 19:14:06 +09:00
YeonGyu-Kim
e326e2dd72 Interactive Bash Simpler 2025-12-15 19:14:06 +09:00
YeonGyu-Kim
03a450131d refactor(hooks): improve interactive bash session tracking and command parsing
- Replace regex-based session extraction with quote-aware tokenizer
- Add proper tmux global options handling (-L, -S, -f, -c, -T)
- Add normalizeSessionName to strip :window and .pane suffixes
- Add findSubcommand for proper subcommand detection
- Add early error output return to avoid false state tracking
- Fix tool-output-truncator to exclude grep/Grep from generic truncation
- Fix todo-continuation-enforcer to clear reminded state on assistant response
- Add proper parallel stdout/stderr reading in interactive_bash tool
- Improve error handling with proper exit code checking

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-15 19:14:06 +09:00
YeonGyu-Kim
5cbef252a3 feat(tools): add interactive_bash tool for tmux session management
Add a new tool for managing tmux sessions with automatic tracking and cleanup:

- interactive_bash tool: Accepts tmux commands via tmux_command parameter
- Session tracking hook: Tracks omo-* prefixed tmux sessions per OpenCode session
- System reminder: Appends active session list after create/delete operations
- Auto cleanup: Kills all tracked tmux sessions on OpenCode session deletion
- Output truncation: Registered in TRUNCATABLE_TOOLS for long capture-pane outputs

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-15 19:14:06 +09:00