Skip to content
Merged
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
31 changes: 24 additions & 7 deletions crates/agent-gateway/web/src/i18n/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ export const translations: Record<Locale, Record<string, string>> = {

/* ── MCP Hub ── */
"mcpHub.title": "MCP Servers",
"mcpHub.subtitle": "Model Context Protocol",
"mcpHub.subtitle": "管理模型上下文协议(MCP)服务器",
"mcpHub.localTitle": "本地 MCP Servers",
"mcpHub.localSubtitle": "管理本地 stdio、Streamable HTTP 和 SSE MCP 配置",
"mcpHub.enabled": "已启用",
Expand All @@ -1910,6 +1910,8 @@ export const translations: Record<Locale, Record<string, string>> = {
"mcpHub.importScanFailed": "扫描失败",
"mcpHub.importNotDetected": "未检测到",
"mcpHub.importEmpty": "该工具没有配置 MCP Server",
"mcpHub.importSearchPlaceholder": "搜索本地 MCP",
"mcpHub.importNoMatch": "未匹配到本地 MCP,换个关键词试试",
"mcpHub.importAlreadyImported": "已导入",
"mcpHub.importSelectAll": "全选",
"mcpHub.importDeselectAll": "取消全选",
Expand Down Expand Up @@ -1968,7 +1970,7 @@ export const translations: Record<Locale, Record<string, string>> = {
"mcpHub.storeSubtitle": "官方 Registry、Smithery 与 Glama",
"mcpHub.storeRefresh": "刷新",
"mcpHub.storeSearch": "搜索",
"mcpHub.storeSearchPlaceholder": "搜索 MCP server",
"mcpHub.storeSearchPlaceholder": "搜索 MCP 服务器",
"mcpHub.storeLoadFailed": "加载 MCP Store 失败",
"mcpHub.storeInstallFailed": "添加 MCP Server 失败",
"mcpHub.storeInstallUnavailable": "这个条目暂时无法自动生成 MCP 配置",
Expand Down Expand Up @@ -2058,7 +2060,7 @@ export const translations: Record<Locale, Record<string, string>> = {
"settings.skillsHubBulkSelect": "批量选择",
"settings.skillsBulkSelect": "批量选择",
"settings.skillsBulkSelectAll": "全部选中",
"settings.skillsBulkDeselectAll": "全部取消",
"settings.skillsBulkDeselectAll": "全部不选",
"settings.skillsBulkHint": "点击卡片选择 · Shift+点击可选择一段区间",
"settings.skillsBulkImportHint": "点击卡片勾选 · Shift+点击可选择一段区间",
"settings.skillsBulkUpdated": "已更新 {count} 个技能",
Expand Down Expand Up @@ -2093,8 +2095,8 @@ export const translations: Record<Locale, Record<string, string>> = {
"settings.skillsInstalledPreviewDescription": "技能描述",
"settings.skillsInstalledPreviewNoDescription": "暂无描述",
"settings.skillsInstalledPreviewCopyDescription": "复制技能描述",
"settings.skillsInstalledPreviewCopyFile": "复制文件预览",
"settings.skillsInstalledPreviewCopied": "已复制",
"settings.skillsInstalledPreviewCopyFile": "复制技能文件内容",
"settings.skillsInstalledPreviewCopied": "已复制到剪贴板",
"settings.skillsInstalledPreviewDetails": "信息",
"settings.skillsInstalledPreviewBaseDir": "目录",
"settings.skillsInstalledPreviewSkillFile": "技能文件",
Expand All @@ -2115,6 +2117,12 @@ export const translations: Record<Locale, Record<string, string>> = {
"settings.skillsAlwaysOn": "内置",
"settings.skillsScan": "扫描",
"settings.skillsScanning": "扫描中",
"settings.skillsScanHint": "重新读取 LiveAgent Skills 目录并同步当前会话可用能力",
"settings.skillsScanComplete": "扫描完成",
"settings.skillsScanFailed": "扫描失败",
"settings.skillsScanFound": "共发现 {count} 个 Skill",
"settings.skillsScanChanged": "新增 {added} · 更新 {updated} · 移除 {removed}",
"settings.skillsScanNoChanges": "未发现变化,当前列表已是最新",
"settings.skillsDisabledHint": "技能功能已关闭,开启后才会将选中的技能注入 system prompt",
"settings.skillsDisabledInChatMode":
"Chat 模式下不启用技能。切换到 Agent 模式后,才会恢复扫描、选择和注入能力。",
Expand Down Expand Up @@ -4239,6 +4247,8 @@ export const translations: Record<Locale, Record<string, string>> = {
"mcpHub.importScanFailed": "Scan failed",
"mcpHub.importNotDetected": "Not detected",
"mcpHub.importEmpty": "No MCP servers configured for this tool",
"mcpHub.importSearchPlaceholder": "Search local MCPs",
"mcpHub.importNoMatch": "No local MCP matches — try a different keyword",
"mcpHub.importAlreadyImported": "Imported",
"mcpHub.importSelectAll": "Select all",
"mcpHub.importDeselectAll": "Deselect all",
Expand Down Expand Up @@ -4430,8 +4440,8 @@ export const translations: Record<Locale, Record<string, string>> = {
"settings.skillsInstalledPreviewDescription": "Description",
"settings.skillsInstalledPreviewNoDescription": "No description",
"settings.skillsInstalledPreviewCopyDescription": "Copy Skill description",
"settings.skillsInstalledPreviewCopyFile": "Copy file preview",
"settings.skillsInstalledPreviewCopied": "Copied",
"settings.skillsInstalledPreviewCopyFile": "Copy Skill file contents",
"settings.skillsInstalledPreviewCopied": "Copied to clipboard",
"settings.skillsInstalledPreviewDetails": "Details",
"settings.skillsInstalledPreviewBaseDir": "Directory",
"settings.skillsInstalledPreviewSkillFile": "Skill file",
Expand All @@ -4452,6 +4462,13 @@ export const translations: Record<Locale, Record<string, string>> = {
"settings.skillsAlwaysOn": "Built-in",
"settings.skillsScan": "Scan",
"settings.skillsScanning": "Scanning",
"settings.skillsScanHint":
"Rescan the LiveAgent Skills directory and sync capabilities available to this conversation",
"settings.skillsScanComplete": "Scan complete",
"settings.skillsScanFailed": "Scan failed",
"settings.skillsScanFound": "Found {count} Skills",
"settings.skillsScanChanged": "{added} added · {updated} updated · {removed} removed",
"settings.skillsScanNoChanges": "No changes found. The list is up to date",
"settings.skillsDisabledHint":
"Skills is off. Enable it to inject selected skills into the system prompt.",
"settings.skillsDisabledInChatMode":
Expand Down
74 changes: 74 additions & 0 deletions crates/agent-gateway/web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,80 @@
@apply my-5 border-border/45;
}

/* Long-form files and documentation use a calmer, denser reading rhythm
* than conversational Markdown. This profile is shared by Skill and
* workspace file previews; chat typography remains unchanged. */
.document-markdown {
@apply text-[calc(13px*var(--zone-font-scale,1))] leading-6 text-foreground/85;
}
.document-markdown p {
@apply my-2.5 text-[calc(13px*var(--zone-font-scale,1))] leading-6 text-foreground/85;
}
.document-markdown strong,
.document-markdown [data-streamdown="strong"] {
@apply font-semibold text-foreground;
}
.document-markdown [data-streamdown="heading-1"] {
@apply mb-3 mt-7 text-lg font-semibold leading-7 tracking-tight text-foreground;
}
.document-markdown [data-streamdown="heading-2"] {
@apply mb-2.5 mt-7 text-base font-semibold leading-6 tracking-tight text-foreground;
}
.document-markdown [data-streamdown="heading-3"] {
@apply mb-2 mt-6 text-sm font-semibold leading-6 tracking-tight text-foreground;
}
.document-markdown [data-streamdown="heading-4"],
.document-markdown [data-streamdown="heading-5"] {
@apply mb-1.5 mt-5 text-xs font-semibold leading-5 tracking-tight text-foreground;
}
.document-markdown [data-streamdown="heading-6"] {
@apply mb-1.5 mt-5 text-[11px] font-semibold leading-5 tracking-wide text-foreground/80;
}
.document-markdown [data-streamdown="unordered-list"],
.document-markdown [data-streamdown="ordered-list"] {
@apply my-3 ml-0 space-y-1 pl-5;
}
.document-markdown [data-streamdown="unordered-list"] [data-streamdown="unordered-list"],
.document-markdown [data-streamdown="ordered-list"] [data-streamdown="ordered-list"],
.document-markdown [data-streamdown="unordered-list"] [data-streamdown="ordered-list"],
.document-markdown [data-streamdown="ordered-list"] [data-streamdown="unordered-list"] {
@apply my-1;
}
.document-markdown [data-streamdown="list-item"] {
@apply pl-0.5 text-[calc(13px*var(--zone-font-scale,1))] leading-6 text-foreground/85;
}
.document-markdown [data-streamdown="list-item"] > p {
@apply my-0;
}
.document-markdown [data-streamdown="blockquote"] {
@apply my-4 border-l-2 border-border pl-3 not-italic text-foreground/75;
}
.document-markdown [data-streamdown="inline-code"] {
@apply rounded border border-border/50 bg-muted/65 px-1 py-0.5 text-[0.9em] text-foreground;
}
.document-markdown [data-streamdown="code-block"] {
@apply my-4;
}
.document-markdown [data-streamdown="code-block-header"] {
@apply h-7 px-1 text-[calc(10px*var(--zone-font-scale,1))] tracking-[0.04em] text-muted-foreground;
}
.document-markdown [data-streamdown="code-block-body"] {
@apply rounded-lg bg-muted/55 p-3;
}
.document-markdown pre > code {
@apply !py-3 text-[calc(12px*var(--zone-font-scale,1))] leading-5 text-foreground/90;
}
.document-markdown [data-streamdown="table"] {
@apply text-[calc(13px*var(--zone-font-scale,1))];
}
.document-markdown [data-streamdown="table-header-cell"],
.document-markdown [data-streamdown="table-cell"] {
@apply py-2 leading-5;
}
.document-markdown [data-streamdown="horizontal-rule"] {
@apply my-7 border-border/60;
}

/* First/last child margin reset */
.chat-markdown > *:first-child,
.chat-markdown > *:first-child > *:first-child {
Expand Down
31 changes: 24 additions & 7 deletions crates/agent-gui/src/i18n/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1965,7 +1965,7 @@ export const translations: Record<Locale, Record<string, string>> = {

/* ── MCP Hub ── */
"mcpHub.title": "MCP Servers",
"mcpHub.subtitle": "Model Context Protocol",
"mcpHub.subtitle": "管理模型上下文协议(MCP)服务器",
"mcpHub.localTitle": "本地 MCP Servers",
"mcpHub.localSubtitle": "管理本地 stdio、Streamable HTTP 和 SSE MCP 配置",
"mcpHub.enabled": "已启用",
Expand All @@ -1979,6 +1979,8 @@ export const translations: Record<Locale, Record<string, string>> = {
"mcpHub.importScanFailed": "扫描失败",
"mcpHub.importNotDetected": "未检测到",
"mcpHub.importEmpty": "该工具没有配置 MCP Server",
"mcpHub.importSearchPlaceholder": "搜索本地 MCP",
"mcpHub.importNoMatch": "未匹配到本地 MCP,换个关键词试试",
"mcpHub.importAlreadyImported": "已导入",
"mcpHub.importSelectAll": "全选",
"mcpHub.importDeselectAll": "取消全选",
Expand Down Expand Up @@ -2037,7 +2039,7 @@ export const translations: Record<Locale, Record<string, string>> = {
"mcpHub.storeSubtitle": "官方 Registry、Smithery 与 Glama",
"mcpHub.storeRefresh": "刷新",
"mcpHub.storeSearch": "搜索",
"mcpHub.storeSearchPlaceholder": "搜索 MCP server",
"mcpHub.storeSearchPlaceholder": "搜索 MCP 服务器",
"mcpHub.storeLoadFailed": "加载 MCP Store 失败",
"mcpHub.storeInstallFailed": "添加 MCP Server 失败",
"mcpHub.storeInstallUnavailable": "这个条目暂时无法自动生成 MCP 配置",
Expand Down Expand Up @@ -2146,8 +2148,8 @@ export const translations: Record<Locale, Record<string, string>> = {
"settings.skillsInstalledPreviewDescription": "技能描述",
"settings.skillsInstalledPreviewNoDescription": "暂无描述",
"settings.skillsInstalledPreviewCopyDescription": "复制技能描述",
"settings.skillsInstalledPreviewCopyFile": "复制文件预览",
"settings.skillsInstalledPreviewCopied": "已复制",
"settings.skillsInstalledPreviewCopyFile": "复制技能文件内容",
"settings.skillsInstalledPreviewCopied": "已复制到剪贴板",
"settings.skillsInstalledPreviewDetails": "信息",
"settings.skillsInstalledPreviewBaseDir": "目录",
"settings.skillsInstalledPreviewSkillFile": "技能文件",
Expand All @@ -2168,6 +2170,12 @@ export const translations: Record<Locale, Record<string, string>> = {
"settings.skillsAlwaysOn": "内置",
"settings.skillsScan": "扫描",
"settings.skillsScanning": "扫描中",
"settings.skillsScanHint": "重新读取 LiveAgent Skills 目录并同步当前会话可用能力",
"settings.skillsScanComplete": "扫描完成",
"settings.skillsScanFailed": "扫描失败",
"settings.skillsScanFound": "共发现 {count} 个 Skill",
"settings.skillsScanChanged": "新增 {added} · 更新 {updated} · 移除 {removed}",
"settings.skillsScanNoChanges": "未发现变化,当前列表已是最新",
"settings.skillsDisabledHint": "技能功能已关闭,开启后才会将选中的技能注入 system prompt",
"settings.skillsDisabledInChatMode":
"Chat 模式下不启用技能。切换到 Agent 模式后,才会恢复扫描、选择和注入能力。",
Expand All @@ -2184,7 +2192,7 @@ export const translations: Record<Locale, Record<string, string>> = {
"settings.skillsStoreSearch": "搜索 ClawHub 技能",
"settings.skillsBulkSelect": "批量选择",
"settings.skillsBulkSelectAll": "全部选中",
"settings.skillsBulkDeselectAll": "全部取消",
"settings.skillsBulkDeselectAll": "全部不选",
"settings.skillsBulkHint": "点击卡片选择 · Shift+点击可选择一段区间",
"settings.skillsBulkImportHint": "点击卡片勾选 · Shift+点击可选择一段区间",
"settings.skillsBulkUpdated": "已更新 {count} 个技能",
Expand Down Expand Up @@ -4388,6 +4396,8 @@ export const translations: Record<Locale, Record<string, string>> = {
"mcpHub.importScanFailed": "Scan failed",
"mcpHub.importNotDetected": "Not detected",
"mcpHub.importEmpty": "No MCP servers configured for this tool",
"mcpHub.importSearchPlaceholder": "Search local MCPs",
"mcpHub.importNoMatch": "No local MCP matches — try a different keyword",
"mcpHub.importAlreadyImported": "Imported",
"mcpHub.importSelectAll": "Select all",
"mcpHub.importDeselectAll": "Deselect all",
Expand Down Expand Up @@ -4562,8 +4572,8 @@ export const translations: Record<Locale, Record<string, string>> = {
"settings.skillsInstalledPreviewDescription": "Description",
"settings.skillsInstalledPreviewNoDescription": "No description",
"settings.skillsInstalledPreviewCopyDescription": "Copy Skill description",
"settings.skillsInstalledPreviewCopyFile": "Copy file preview",
"settings.skillsInstalledPreviewCopied": "Copied",
"settings.skillsInstalledPreviewCopyFile": "Copy Skill file contents",
"settings.skillsInstalledPreviewCopied": "Copied to clipboard",
"settings.skillsInstalledPreviewDetails": "Details",
"settings.skillsInstalledPreviewBaseDir": "Directory",
"settings.skillsInstalledPreviewSkillFile": "Skill file",
Expand All @@ -4584,6 +4594,13 @@ export const translations: Record<Locale, Record<string, string>> = {
"settings.skillsAlwaysOn": "Built-in",
"settings.skillsScan": "Scan",
"settings.skillsScanning": "Scanning",
"settings.skillsScanHint":
"Rescan the LiveAgent Skills directory and sync capabilities available to this conversation",
"settings.skillsScanComplete": "Scan complete",
"settings.skillsScanFailed": "Scan failed",
"settings.skillsScanFound": "Found {count} Skills",
"settings.skillsScanChanged": "{added} added · {updated} updated · {removed} removed",
"settings.skillsScanNoChanges": "No changes found. The list is up to date",
"settings.skillsDisabledHint":
"Skills is off. Enable it to inject selected skills into the system prompt.",
"settings.skillsDisabledInChatMode":
Expand Down
74 changes: 74 additions & 0 deletions crates/agent-gui/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,80 @@
@apply my-5 border-border/45;
}

/* Long-form files and documentation use a calmer, denser reading rhythm
* than conversational Markdown. This profile is shared by Skill and
* workspace file previews; chat typography remains unchanged. */
.document-markdown {
@apply text-[calc(13px*var(--zone-font-scale,1))] leading-6 text-foreground/85;
}
.document-markdown p {
@apply my-2.5 text-[calc(13px*var(--zone-font-scale,1))] leading-6 text-foreground/85;
}
.document-markdown strong,
.document-markdown [data-streamdown="strong"] {
@apply font-semibold text-foreground;
}
.document-markdown [data-streamdown="heading-1"] {
@apply mb-3 mt-7 text-lg font-semibold leading-7 tracking-tight text-foreground;
}
.document-markdown [data-streamdown="heading-2"] {
@apply mb-2.5 mt-7 text-base font-semibold leading-6 tracking-tight text-foreground;
}
.document-markdown [data-streamdown="heading-3"] {
@apply mb-2 mt-6 text-sm font-semibold leading-6 tracking-tight text-foreground;
}
.document-markdown [data-streamdown="heading-4"],
.document-markdown [data-streamdown="heading-5"] {
@apply mb-1.5 mt-5 text-xs font-semibold leading-5 tracking-tight text-foreground;
}
.document-markdown [data-streamdown="heading-6"] {
@apply mb-1.5 mt-5 text-[11px] font-semibold leading-5 tracking-wide text-foreground/80;
}
.document-markdown [data-streamdown="unordered-list"],
.document-markdown [data-streamdown="ordered-list"] {
@apply my-3 ml-0 space-y-1 pl-5;
}
.document-markdown [data-streamdown="unordered-list"] [data-streamdown="unordered-list"],
.document-markdown [data-streamdown="ordered-list"] [data-streamdown="ordered-list"],
.document-markdown [data-streamdown="unordered-list"] [data-streamdown="ordered-list"],
.document-markdown [data-streamdown="ordered-list"] [data-streamdown="unordered-list"] {
@apply my-1;
}
.document-markdown [data-streamdown="list-item"] {
@apply pl-0.5 text-[calc(13px*var(--zone-font-scale,1))] leading-6 text-foreground/85;
}
.document-markdown [data-streamdown="list-item"] > p {
@apply my-0;
}
.document-markdown [data-streamdown="blockquote"] {
@apply my-4 border-l-2 border-border pl-3 not-italic text-foreground/75;
}
.document-markdown [data-streamdown="inline-code"] {
@apply rounded border border-border/50 bg-muted/65 px-1 py-0.5 text-[0.9em] text-foreground;
}
.document-markdown [data-streamdown="code-block"] {
@apply my-4;
}
.document-markdown [data-streamdown="code-block-header"] {
@apply h-7 px-1 text-[calc(10px*var(--zone-font-scale,1))] tracking-[0.04em] text-muted-foreground;
}
.document-markdown [data-streamdown="code-block-body"] {
@apply rounded-lg bg-muted/55 p-3;
}
.document-markdown pre > code {
@apply !py-3 text-[calc(12px*var(--zone-font-scale,1))] leading-5 text-foreground/90;
}
.document-markdown [data-streamdown="table"] {
@apply text-[calc(13px*var(--zone-font-scale,1))];
}
.document-markdown [data-streamdown="table-header-cell"],
.document-markdown [data-streamdown="table-cell"] {
@apply py-2 leading-5;
}
.document-markdown [data-streamdown="horizontal-rule"] {
@apply my-7 border-border/60;
}

/* First/last child margin reset */
.chat-markdown > *:first-child,
.chat-markdown > *:first-child > *:first-child {
Expand Down
1 change: 1 addition & 0 deletions crates/agent-gui/test/chat/markdown-code-collapse.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function createMarkdownModule(expanded) {
X: "X",
},
"./ui/button": { Button: "Button" },
"./ui/copy-button": { CopyButton: "CopyButton" },
},
});
return loader.loadModule("@liveagent/ui/components/Markdown.tsx");
Expand Down
Loading
Loading