fix(background-task): change default block to false and clarify system notification
- Change background_output default from block=true to block=false - Add documentation about system auto-notification on task completion - Clarify that block=false returns full status info, not empty 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -18,16 +18,19 @@ export const BACKGROUND_OUTPUT_DESCRIPTION = `Get output from a background task.
|
||||
|
||||
Arguments:
|
||||
- task_id: Required task ID to get output from
|
||||
- block: If true (default), wait for task completion. If false, return current status immediately.
|
||||
- block: If true, wait for task completion. If false (default), return current status immediately.
|
||||
- timeout: Max wait time in ms when blocking (default: 60000, max: 600000)
|
||||
|
||||
Returns:
|
||||
- When not blocking: Returns current status with task ID, description, agent, status, duration, and progress info
|
||||
- When blocking: Waits for completion, then returns full result
|
||||
- When not blocking: Returns current status and progress
|
||||
|
||||
IMPORTANT: The system automatically notifies the main session when background tasks complete.
|
||||
You typically don't need block=true - just use block=false to check status, and the system will notify you when done.
|
||||
|
||||
Use this to:
|
||||
- Check task progress (block=false)
|
||||
- Wait for and retrieve task result (block=true)
|
||||
- Check task progress (block=false) - returns full status info, NOT empty
|
||||
- Wait for and retrieve task result (block=true) - only when you explicitly need to wait
|
||||
- Set custom timeout for long tasks`
|
||||
|
||||
export const BACKGROUND_CANCEL_DESCRIPTION = `Cancel a running background task.
|
||||
|
||||
Reference in New Issue
Block a user