You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): add -p flag for prompt automation and subagent chunk logging
Adds support for running the CLI chat app with a prompt argument that auto-executes and displays debug logs.
Changes:
- cli/src/index.tsx: Parse -p argument and pass initialPrompt to App
- cli/src/chat.tsx: Auto-submit prompt on mount, wait for completion, display debug log, then exit
- cli/src/chat.tsx: Log subagent chunks via handleEvent callback
- cli/src/chat.tsx: Track subagent lifecycle with activeSubagentsRef
- cli/src/chat.tsx: Conditionally log chunks in handleStreamChunk when subagents are active
- sdk/src/run.ts: Simplify onSubagentResponseChunk to only call callbacks (remove file logging)
- sdk/src/run-state.ts: Remove unused subagents field from RunState type
- sdk/README.md: Remove documentation about codebuff-events.log
Usage: bun run cli/src/index.tsx -p "your prompt here"
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Copy file name to clipboardExpand all lines: sdk/README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,10 @@ Runs a Codebuff agent with the specified options.
166
166
167
167
Returns a Promise that resolves to a `RunState` object which can be passed into subsequent runs via the `previousRun` parameter to resume the conversation.
168
168
169
+
The `RunState` object contains:
170
+
-`sessionState`: Internal state to be passed to the next run
171
+
-`output`: The agent's output (text, error, or other types)
0 commit comments