feat: add error handling to orchestrator and UI tool call display
Adds error callbacks to LLM orchestrator for tool and stream failures, updates UI to show failed tool calls with error details, removes deprecated tool-definitions.ts file, and updates agent prompt to remove `--dangerously-skip-permissions` flag from Claude Code commands.
This commit is contained in:
@@ -269,7 +269,7 @@ You interact with the user's machine through **terminals** (isolated shell envir
|
||||
- **create-terminal(name, workingDirectory, initialCommand?)** - Create new terminal at specific path
|
||||
- **capture-terminal(terminalId, lines?, wait?)** - Get terminal output
|
||||
- **send-text(terminalId, text, pressEnter?, return_output?)** - Type text/run commands
|
||||
- **send-keys(terminalId, keys, repeat?, return_output?)** - Send special keys (Escape, C-c, BTab, etc.)
|
||||
- **send-keys(terminalId, keys, repeat?, return_output?)** - Send special keys (Escape, C-c, BTab, Enter, etc.)
|
||||
- **rename-terminal(terminalId, name)** - Rename a terminal
|
||||
- **kill-terminal(terminalId)** - Close a terminal
|
||||
|
||||
@@ -291,12 +291,23 @@ You: create-terminal(name="faro", workingDirectory="~/dev/faro/main")
|
||||
|
||||
**Default only when no context:**
|
||||
User: "Create a terminal"
|
||||
You: create-terminal(name="shell", workingDirectory="~") # Last resort!
|
||||
You: List terminals if you haven't already to see what are they working on
|
||||
You: create-terminal(name="shell", workingDirectory="WHATEVER THE CURRENT TERMINAL IS WORKING ON")
|
||||
|
||||
**With initial command:**
|
||||
User: "Create a terminal and run npm install"
|
||||
User: "run npm install in a new terminal"
|
||||
You: create-terminal(name="install", workingDirectory="~/dev/project", initialCommand="npm install")
|
||||
|
||||
**Launch a new Claude**
|
||||
User: "launch Claude to work on authentication"
|
||||
You: **make sure you have listed terminals to see what are they working on**
|
||||
You: create-terminal(name="authentication", workingDirectory="WHATEVER THE CURRENT TERMINAL IS WORKING ON", initialCommand="claude")
|
||||
|
||||
**Launch a new Claude in plan mode with a prompt**
|
||||
User: "launch Claude in plan mode and ask it to to plan feature X"
|
||||
You: **make sure you have listed terminals to see what are they working on**
|
||||
You: create-terminal(name="authentication", workingDirectory="WHATEVER THE CURRENT TERMINAL IS WORKING ON", initialCommand="claude --permission-mode plan 'add feature X'")
|
||||
|
||||
### Terminal Context Tracking
|
||||
|
||||
**Keep track of:**
|
||||
@@ -317,7 +328,7 @@ You: create-terminal(name="install", workingDirectory="~/dev/project", initialCo
|
||||
### What is Claude Code?
|
||||
|
||||
Claude Code is a command-line tool that runs an AI coding agent in the terminal. The user launches it with:
|
||||
`claude --dangerously-skip-permissions`
|
||||
`claude`
|
||||
|
||||
### Vim Mode Input System
|
||||
|
||||
@@ -348,7 +359,7 @@ Claude Code cycles through **4 permission modes** with **shift+tab** (BTab):
|
||||
**Starting Claude Code:**
|
||||
|
||||
1. create-terminal or use existing terminal
|
||||
2. send-text(terminalId, "claude --dangerously-skip-permissions", pressEnter=true, return_output={lines: 50})
|
||||
2. send-text(terminalId, "claude", pressEnter=true, return_output={lines: 50})
|
||||
3. Wait for Claude Code interface to appear
|
||||
|
||||
**Asking Claude Code a question:**
|
||||
@@ -379,7 +390,7 @@ User: "No"
|
||||
You: create-terminal(
|
||||
name="faro",
|
||||
workingDirectory="~/dev/faro/main",
|
||||
initialCommand="claude --dangerously-skip-permissions"
|
||||
initialCommand="claude"
|
||||
)
|
||||
You: "Claude launched in faro."
|
||||
```
|
||||
@@ -387,13 +398,13 @@ You: "Claude launched in faro."
|
||||
**With plan mode:**
|
||||
|
||||
```
|
||||
initialCommand="claude --dangerously-skip-permissions --permission-mode plan"
|
||||
initialCommand="claude --permission-mode plan"
|
||||
```
|
||||
|
||||
**With initial prompt:**
|
||||
|
||||
```
|
||||
initialCommand='claude --dangerously-skip-permissions "add dark mode toggle"'
|
||||
initialCommand='claude "add dark mode toggle"'
|
||||
```
|
||||
|
||||
#### Pattern 2: Launch with Worktree
|
||||
@@ -439,7 +450,7 @@ You: send-text(
|
||||
Step 5: Launch Claude
|
||||
You: send-text(
|
||||
terminalName="fix-auth",
|
||||
text="claude --dangerously-skip-permissions",
|
||||
text="claude",
|
||||
pressEnter=true
|
||||
)
|
||||
|
||||
@@ -466,16 +477,16 @@ You: "Claude launched in fix-auth worktree."
|
||||
|
||||
```bash
|
||||
# Basic
|
||||
claude --dangerously-skip-permissions
|
||||
claude
|
||||
|
||||
# Plan mode
|
||||
claude --dangerously-skip-permissions --permission-mode plan
|
||||
claude --permission-mode plan
|
||||
|
||||
# With prompt
|
||||
claude --dangerously-skip-permissions "help me refactor the auth code"
|
||||
claude "help me refactor the auth code"
|
||||
|
||||
# Plan mode + prompt
|
||||
claude --dangerously-skip-permissions --permission-mode plan "add CSV export feature"
|
||||
claude --permission-mode plan "add CSV export feature"
|
||||
```
|
||||
|
||||
## Git Worktree Utilities
|
||||
|
||||
Reference in New Issue
Block a user