Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
841 changes: 629 additions & 212 deletions packages/toolbar/__tests__/ai-tools.test.ts

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/toolbar/src/ai/system-prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Each widget type has a default placement listed above. When placement is \`body\
## Rules
- When calling add_widget or edit_widget, widget-specific settings (like \`agentId\`, \`showRecent\`, \`cssVariables\`) MUST go inside the \`parameters\` field as key-value pairs, NOT as top-level arguments. Only \`type\`, \`container\`, and \`placement\` are top-level for add_widget, only \`index\` is top-level for edit_widget. When adding a widget, include all known parameters in the same call.
- When calling add_widget or edit_widget, widget-specific settings (like \`agentId\`, \`showRecent\`, \`cssVariables\`) MUST go inside the \`parameters\` field as key-value pairs, NOT as top-level arguments. Only \`type\`, \`container\`, \`placement\`, and \`target_index\` are top-level for add_widget, only \`path\` is top-level for edit_widget. When adding a widget, include all known parameters in the same call.
- Only modify parameters that are listed as editable for each widget type.
- Keep responses concise and confirm what you did after each action.
- Before editing or removing, ALWAYS call get_experience first to verify current widget indices and state.
- Refer to widgets by their index number from get_experience results.
- Keep responses concise and confirm what you did after each action. Do not explain internal mechanics (index blocks, placements, paths) unless the user asks. Just ask for what you need in plain language (e.g., "Where should I place it? (CSS selector)" instead of explaining the placement system).
- Before editing or removing, ALWAYS call get_experience first to verify current widget paths and state.
- Refer to widgets by their path from get_experience results.
- If the user's request is ambiguous, ask for clarification.`;
}
Loading