(locale: string = 'zh-CN')
| 111 | } |
| 112 | |
| 113 | export function getChartCapabilitySkill(locale: string = 'zh-CN'): SkillDef { |
| 114 | const isZh = locale.startsWith('zh') |
| 115 | return { |
| 116 | id: CHART_CAPABILITY_SKILL_ID, |
| 117 | name: isZh ? '绘图助手' : 'Chart Assistant', |
| 118 | description: isZh ? '按本轮问题生成灵活的聊天数据图表' : 'Generate flexible charts for this chat question', |
| 119 | tags: [isZh ? '图表' : 'chart'], |
| 120 | chatScope: 'all', |
| 121 | tools: ['render_chart', 'get_schema'], |
| 122 | prompt: isZh ? ZH_PROMPT : EN_PROMPT, |
| 123 | builtinId: CHART_CAPABILITY_SKILL_ID, |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | function getChartMenuLine(locale: string): string { |
| 128 | const skill = getChartCapabilitySkill(locale) |
no outgoing calls
no test coverage detected