wip: more rework and docs
This commit is contained in:
@@ -328,7 +328,7 @@ Available UI Render Tools (use these to show rich interactive elements):
|
||||
- render_card: Show an information card with title, body, and action buttons.
|
||||
- render_metric: Show a single KPI or statistic prominently.
|
||||
- render_list: Show a bulleted list of items.
|
||||
- render_tabs: Organize information into switchable tabs.
|
||||
- render_tabs: Organize information into switchable tabs. Tab content supports all content types: text, metrics, lists, charts, and tables.
|
||||
|
||||
When answering questions:
|
||||
1. USE THE TOOLS to find information. Never make up data about posts or media.
|
||||
@@ -338,7 +338,8 @@ When answering questions:
|
||||
5. When asked to describe or analyze an image, use the view_image tool to see the actual image content.
|
||||
6. When presenting data, statistics, or comparisons, prefer using render tools (render_chart, render_table, render_metric) to show rich interactive UI instead of plain text.
|
||||
7. When you need user input for a multi-field operation, use render_form to present a structured form.
|
||||
8. Use render_card with action buttons when presenting items the user might want to navigate to (e.g., posts, media).`;
|
||||
8. Use render_card with action buttons when presenting items the user might want to navigate to (e.g., posts, media).
|
||||
9. When comparing data across multiple dimensions (e.g., statistics per year), use render_tabs with embedded charts or tables in each tab.`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1018,7 +1018,7 @@ export class OpenCodeManager {
|
||||
},
|
||||
{
|
||||
name: 'render_tabs',
|
||||
description: 'Render a tabbed interface in the chat UI. Use this when you want to organize information into multiple tabs that the user can switch between.',
|
||||
description: 'Render a tabbed interface in the chat UI. Use this when you want to organize information into multiple tabs that the user can switch between. Each tab can contain any combination of text, metrics, lists, charts, and tables.',
|
||||
input_schema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
@@ -1033,7 +1033,28 @@ export class OpenCodeManager {
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
type: { type: 'string', enum: ['text', 'metric', 'list'], description: 'Content type' },
|
||||
type: { type: 'string', enum: ['text', 'metric', 'list', 'chart', 'table'], description: 'Content type' },
|
||||
text: { type: 'string', description: 'Text content (for type text)' },
|
||||
label: { type: 'string', description: 'Label (for type metric)' },
|
||||
value: { type: 'string', description: 'Display value (for type metric)' },
|
||||
title: { type: 'string', description: 'Title (for type list, chart, or table)' },
|
||||
items: { type: 'array', items: { type: 'string' }, description: 'Items (for type list)' },
|
||||
chartType: { type: 'string', enum: ['bar', 'line', 'pie'], description: 'Chart type (for type chart)' },
|
||||
series: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: { label: { type: 'string' }, value: { type: 'number' } },
|
||||
required: ['label', 'value'],
|
||||
},
|
||||
description: 'Data series (for type chart)',
|
||||
},
|
||||
columns: { type: 'array', items: { type: 'string' }, description: 'Column headers (for type table)' },
|
||||
rows: {
|
||||
type: 'array',
|
||||
items: { type: 'array', items: { type: 'string' } },
|
||||
description: 'Table rows (for type table)',
|
||||
},
|
||||
},
|
||||
required: ['type'],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user