chore: typo

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Simon
2026-06-03 20:20:37 +08:00
parent 0b6f0a6068
commit e7b93efda0
3 changed files with 6 additions and 5 deletions

View File

@@ -73,8 +73,8 @@ export class PageAgentCore extends EventTarget {
disposed = false disposed = false
/** /**
* Callback for when agent needs user input (ask_user tool) * Called when the agent needs to ask the user questions.
* If not set, ask_user tool will be disabled * If unset, the `ask_user` tool will be disabled.
* @example onAskUser: (q) => window.prompt(q) || '' * @example onAskUser: (q) => window.prompt(q) || ''
*/ */
onAskUser?: (question: string) => Promise<string> onAskUser?: (question: string) => Promise<string>

View File

@@ -60,7 +60,8 @@ export interface PanelAgentAdapter extends EventTarget {
readonly task: string readonly task: string
/** /**
* Callback for when agent needs user input. * Called when the agent needs to ask the user questions.
* If unset, the `ask_user` tool will be disabled.
* Panel will set this to handle user questions via its UI. * Panel will set this to handle user questions via its UI.
*/ */
onAskUser?: (question: string) => Promise<string> onAskUser?: (question: string) => Promise<string>

View File

@@ -356,8 +356,8 @@ const result = await agent.execute('Fill in the form with test data')`}
name: 'onAskUser', name: 'onAskUser',
type: '(question: string) => Promise<string>', type: '(question: string) => Promise<string>',
description: isZh description: isZh
? 'Agent 需要用户输入时的回调。未设置则禁用 ask_user 工具。' ? '当 agent 需要用户提问时调用。未设置则禁用 `ask_user` 工具。'
: 'Callback when agent needs user input. If not set, ask_user tool is disabled.', : 'Called when the agent needs to ask the user questions. If unset, the `ask_user` tool will be disabled.',
}, },
]} ]}
/> />