新增: obscura 安装引导(prompt AI 看 hint 帮装 + 前端工具卡片 AI 帮装按钮)
This commit is contained in:
@@ -150,6 +150,8 @@ export default {
|
||||
regenerate: 'Regenerate',
|
||||
regenerateFailed: 'Regenerate failed: {msg}',
|
||||
regenerateUnavailable: 'No reply to regenerate',
|
||||
// fetch_url "Install obscura via AI" button triggers sendMessage; failure toast (mirrors editMessageFailed)
|
||||
sendFailed: 'Send failed: {msg}',
|
||||
|
||||
// ── UX-09: edit last user message and regenerate ──
|
||||
editMessage: 'Edit',
|
||||
|
||||
@@ -93,6 +93,26 @@ export default {
|
||||
httpTruncated: 'Response truncated ({bytes}), see details',
|
||||
httpRequestFallback: 'HTTP Request',
|
||||
foundN: 'Found {n}',
|
||||
// fetch_url result (render_mode badge + obscura install guidance)
|
||||
// - fetchUrlTitle: header subtitle when title present
|
||||
// - fetchUrlRendered: render_mode=obscura (JS render success) badge text
|
||||
// - fetchUrlStatic: render_mode=static/static_fallback (static) badge text
|
||||
// - fetchUrlFallbackHint: static_fallback (obscura missing/failed) summary, hints static fallback
|
||||
// - fetchUrlChars: static-mode markdown char count (collapsed subtitle)
|
||||
// - charsUnit: char unit (joined with length)
|
||||
// - installObscura: "Install via AI" button label
|
||||
// - obscuraInstallPrompt: dialog auto-sent to AI on button click (cargo install + releases options)
|
||||
fetchUrlTitle: 'Title: {title}',
|
||||
fetchUrlRendered: 'JS rendered',
|
||||
fetchUrlStatic: 'static',
|
||||
fetchUrlFallbackHint: 'obscura not installed, fell back to static mode (JS rendering unavailable)',
|
||||
fetchUrlChars: '{n} chars',
|
||||
charsUnit: 'chars',
|
||||
// fetch_url header display name (useToolCardHeader): host-shortened prefix + fallback when no url
|
||||
fetchUrlPrefix: 'Fetch',
|
||||
fetchUrlFallback: 'Fetch URL',
|
||||
installObscura: 'Install obscura via AI',
|
||||
obscuraInstallPrompt: 'Please install obscura (a Rust headless browser, used by fetch_url render=true for JS rendering). Try `cargo install obscura` first; if cargo is unavailable, download the prebuilt binary for this platform from the GitHub releases (github.com/h4ckf0r0day/obscura) and place it on PATH. After installing, verify with `obscura --version` and tell me I can retry the web fetch.',
|
||||
// grep cross-file content search results (F-260621): per output_mode phrasing
|
||||
grepHitsN: '{n} hits',
|
||||
grepFilesN: '{n} files',
|
||||
|
||||
@@ -151,6 +151,8 @@ export default {
|
||||
regenerate: '重新生成',
|
||||
regenerateFailed: '重新生成失败:{msg}',
|
||||
regenerateUnavailable: '没有可重新生成的回复',
|
||||
// fetch_url "AI 帮装 obscura" 按钮触发 sendMessage 失败的 toast(对齐 editMessageFailed 模式)
|
||||
sendFailed: '发送失败:{msg}',
|
||||
|
||||
// ── UX-09: 编辑末条 user 消息并重新生成 ──
|
||||
editMessage: '编辑',
|
||||
|
||||
@@ -94,6 +94,26 @@ export default {
|
||||
httpTruncated: '响应已截断({bytes}),详见下方',
|
||||
httpRequestFallback: 'HTTP 请求',
|
||||
foundN: '找到 {n} 项',
|
||||
// fetch_url 结果(render_mode 徽标 + obscura 引导)
|
||||
// - fetchUrlTitle: 有 title 时的 header 副标题
|
||||
// - fetchUrlRendered: render_mode=obscura(JS 渲染成功)徽标文案
|
||||
// - fetchUrlStatic: render_mode=static/static_fallback(静态)徽标文案
|
||||
// - fetchUrlFallbackHint: static_fallback(obscura 未装/失败)摘要,提示用户已静态回退
|
||||
// - fetchUrlChars: 静态模式 markdown 字符数(折叠态副标题)
|
||||
// - charsUnit: 字符单位(与 length 拼接)
|
||||
// - installObscura: "AI 帮装"按钮文案
|
||||
// - obscuraInstallPrompt: 点按钮后自动发给 AI 的对话提示(具体到 cargo install + releases 两种装法)
|
||||
fetchUrlTitle: '标题:{title}',
|
||||
fetchUrlRendered: '已 JS 渲染',
|
||||
fetchUrlStatic: '静态',
|
||||
fetchUrlFallbackHint: 'obscura 未装,已用静态模式(可增强 JS 渲染文档)',
|
||||
fetchUrlChars: '{n} 字符',
|
||||
charsUnit: '字符',
|
||||
// fetch_url 头部显示名(useToolCardHeader):host 精简前缀 + 无 url 时兜底
|
||||
fetchUrlPrefix: '获取',
|
||||
fetchUrlFallback: '获取网页',
|
||||
installObscura: 'AI 帮装 obscura',
|
||||
obscuraInstallPrompt: '请帮我安装 obscura(Rust 无头浏览器,用于 fetch_url 的 render=true JS 渲染)。优先尝试 `cargo install obscura`,若 cargo 不可用则从 GitHub releases(github.com/h4ckf0r0day/obscura)下载对应平台预编译二进制并放入 PATH。安装完成后用 `obscura --version` 验证,然后告诉我可以重试网页抓取了。',
|
||||
// grep 跨文件内容搜索结果(F-260621):按 output_mode 分文案
|
||||
grepHitsN: '命中 {n} 处',
|
||||
grepFilesN: '命中 {n} 文件',
|
||||
|
||||
Reference in New Issue
Block a user