@appthen/vibe-workspace 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PLUGIN_DEV.md +30 -0
- package/dist/{DocxPreview-GruinkmZ.js → DocxPreview-D2izjHfQ.js} +5 -5
- package/dist/{DocxPreview-GruinkmZ.js.map → DocxPreview-D2izjHfQ.js.map} +1 -1
- package/dist/{DotBadge-Dm0es7Ho.js → DotBadge-BTtlqPqv.js} +3 -3
- package/dist/{DotBadge-Dm0es7Ho.js.map → DotBadge-BTtlqPqv.js.map} +1 -1
- package/dist/{ExtensionManifestSchema-BIuNTfeS.js → ExtensionManifestSchema-INV7dTEG.js} +3 -3
- package/dist/{ExtensionManifestSchema-BIuNTfeS.js.map → ExtensionManifestSchema-INV7dTEG.js.map} +1 -1
- package/dist/{FreeCanvas-BC24RbJp.js → FreeCanvas-D0qGlWl-.js} +2 -2
- package/dist/{FreeCanvas-BC24RbJp.js.map → FreeCanvas-D0qGlWl-.js.map} +1 -1
- package/dist/{ImagePreview-BUZPZ76T.js → ImagePreview-CVw1IKRl.js} +4 -4
- package/dist/{ImagePreview-BUZPZ76T.js.map → ImagePreview-CVw1IKRl.js.map} +1 -1
- package/dist/{PdfPreview-C431TVJo.js → PdfPreview-BRDBxezL.js} +4 -4
- package/dist/{PdfPreview-C431TVJo.js.map → PdfPreview-BRDBxezL.js.map} +1 -1
- package/dist/{PluginContext-J-PUm9Dt.js → PluginContext-DCtbrkoX.js} +2 -20
- package/dist/PluginContext-DCtbrkoX.js.map +1 -0
- package/dist/{Workbench-C3Gi8mtZ.js → Workbench-Bz0iJPL8.js} +4267 -2776
- package/dist/{Workbench-C3Gi8mtZ.js.map → Workbench-Bz0iJPL8.js.map} +1 -1
- package/dist/{activate-Cn14NQGw.js → activate-B_lpUEhD.js} +84 -80
- package/dist/{activate-Cn14NQGw.js.map → activate-B_lpUEhD.js.map} +1 -1
- package/dist/canvas-core/index.js +1 -1
- package/dist/coding-kit/index.js +1 -1
- package/dist/components/index.js +4 -4
- package/dist/{devWorkbench-Ifd_a8Pb.js → devWorkbench-DZ1mFC3i.js} +2 -2
- package/dist/{devWorkbench-Ifd_a8Pb.js.map → devWorkbench-DZ1mFC3i.js.map} +1 -1
- package/dist/{dialog-DK8v51ew.js → dialog-RPHf7Mz2.js} +2 -2
- package/dist/{dialog-DK8v51ew.js.map → dialog-RPHf7Mz2.js.map} +1 -1
- package/dist/{docx-preview-BdpXCqA9.js → docx-preview-CH7hwx62.js} +2 -2
- package/dist/{docx-preview-BdpXCqA9.js.map → docx-preview-CH7hwx62.js.map} +1 -1
- package/dist/extension-cli/index.js +1 -1
- package/dist/extension-dev/index.js +1 -1
- package/dist/extension-dev-workbench/index.js +4 -4
- package/dist/extension-schema/index.js +3 -3
- package/dist/{extensionRegistry-C_OUg-8s.js → extensionRegistry-B6X2GQLX.js} +10 -7
- package/dist/{extensionRegistry-C_OUg-8s.js.map → extensionRegistry-B6X2GQLX.js.map} +1 -1
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/{list-detail-workspace-template-BVyGyLpE.js → list-detail-workspace-template-DsiEfhxo.js} +2 -2
- package/dist/{list-detail-workspace-template-BVyGyLpE.js.map → list-detail-workspace-template-DsiEfhxo.js.map} +1 -1
- package/dist/overlay/index.js +2 -2
- package/dist/{pluginCapabilities-9gzDTIuB.js → pluginCapabilities-BKLR6W4M.js} +196 -19
- package/dist/pluginCapabilities-BKLR6W4M.js.map +1 -0
- package/dist/plugins/agent/PluginModule.js +2 -2
- package/dist/plugins/base/index.js +1 -1
- package/dist/{sheet-CdvS0URe.js → sheet-tD__qqBd.js} +5 -5
- package/dist/{sheet-CdvS0URe.js.map → sheet-tD__qqBd.js.map} +1 -1
- package/dist/{skeleton-99iI2m9p.js → skeleton-6VSIwQtG.js} +4 -4
- package/dist/{skeleton-99iI2m9p.js.map → skeleton-6VSIwQtG.js.map} +1 -1
- package/dist/types-BL0aIpQ1.js.map +1 -1
- package/dist/ui/index.js +3 -3
- package/dist/{useBinaryFileUrl-CcgcbIxT.js → useBinaryFileUrl-_FJREA5b.js} +3 -3
- package/dist/{useBinaryFileUrl-CcgcbIxT.js.map → useBinaryFileUrl-_FJREA5b.js.map} +1 -1
- package/dist/vibe-workspace/src/components/ExtensionBadgeMark.d.ts +10 -0
- package/dist/vibe-workspace/src/components/LayoutSystem.d.ts +4 -0
- package/dist/vibe-workspace/src/components/MonacoWrapper.d.ts +5 -1
- package/dist/vibe-workspace/src/components/TopBar.d.ts +2 -0
- package/dist/vibe-workspace/src/core/extensionBadges.d.ts +47 -0
- package/dist/vibe-workspace/src/core/extensionBadges.test.d.ts +1 -0
- package/dist/vibe-workspace/src/core/extensionViews.d.ts +6 -0
- package/dist/vibe-workspace/src/core/pluginCapabilities.d.ts +15 -0
- package/dist/vibe-workspace/src/hooks/useThemeLayout.d.ts +3 -0
- package/dist/vibe-workspace/src/index.d.ts +1 -0
- package/dist/vibe-workspace/src/plugins/base/types.d.ts +1 -0
- package/dist/vibe-workspace/src/plugins/conversation-network/components/right-panel/ComponentDockBar.d.ts +6 -0
- package/dist/vibe-workspace/src/plugins/conversation-network/components/right-panel/DynamicComponentZone.d.ts +5 -3
- package/dist/vibe-workspace/src/plugins/conversation-network/components/right-panel/PanelSlotCard.d.ts +6 -1
- package/dist/vibe-workspace/src/plugins/conversation-network/components/right-panel/ParticipantBar.d.ts +1 -2
- package/dist/vibe-workspace/src/plugins/conversation-network/components/right-panel/ParticipantBarItem.d.ts +18 -15
- package/dist/vibe-workspace/src/plugins/conversation-network/conversationHubShell.d.ts +14 -1
- package/dist/vibe-workspace/src/plugins/conversation-network/services/conversationHubShellResolver.d.ts +3 -1
- package/dist/vibe-workspace/src/services/authRedirect.d.ts +1 -0
- package/dist/vibe-workspace/src/services/themeService.d.ts +81 -7
- package/dist/vibe-workspace/src/workbench/WorkbenchAccountMenu.d.ts +5 -0
- package/dist/vibe-workspace.css +36 -43
- package/dist/workbench/index.js +2 -2
- package/package.json +1 -1
- package/postcss.config.js +1 -2
- package/tailwind.config.js +10 -3
- package/dist/PluginContext-J-PUm9Dt.js.map +0 -1
- package/dist/pluginCapabilities-9gzDTIuB.js.map +0 -1
- package/dist/vibe-workspace/src/AgentEmbedPage.d.ts +0 -1
- package/dist/vibe-workspace/src/plugins/work-weixin/WorkWeixinPlugin.d.ts +0 -5
- package/dist/vibe-workspace/src/plugins/work-weixin/apiService.d.ts +0 -8
- package/dist/vibe-workspace/src/plugins/work-weixin/configService.d.ts +0 -46
- package/dist/vibe-workspace/src/plugins/work-weixin/index.d.ts +0 -2
- package/dist/vibe-workspace/src/plugins/workbench-admin/WorkbenchAdminSidebar.d.ts +0 -7
- package/dist/vibe-workspace/src/plugins/workbench-admin/activate.d.ts +0 -2
- package/dist/vibe-workspace/src/plugins/workbench-admin/index.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-BL0aIpQ1.js","sources":["../src/plugins/base/types.ts"],"sourcesContent":["/**\n * 插件系统基础类型定义\n *\n * @module plugins/base/types\n */\n\nexport type { PluginContext } from '@/core/PluginContext';\nexport { createPluginContext } from '@/core/PluginContext';\nimport type { PluginContext } from '@/core/PluginContext';\n\n/**\n * 插件实例接口\n */\nexport interface IPlugin<TConfig = Record<string, any>> {\n /** 插件唯一标识符 */\n id: string;\n /** 插件名称 */\n name: string;\n /** 插件版本 */\n version?: string;\n /** 插件配置 */\n config?: TConfig;\n /** 激活函数,返回可选的停用函数 */\n activate: (ctx: PluginContext) => void | (() => void);\n}\n\n/**\n * 插件工厂函数类型\n */\nexport type PluginFactory<TConfig = Record<string, any>> = (\n config?: Partial<TConfig>\n) => IPlugin<TConfig>;\n\n/**\n * 插件模块 - 定义插件的标准导出结构\n */\nexport interface PluginModule<TConfig = Record<string, any>> {\n /** 插件唯一标识符 */\n id: string;\n /** 插件名称 */\n name: string;\n /** 创建插件实例的工厂函数 */\n create: PluginFactory<TConfig>;\n /** 直接激活插件的函数 */\n activate: (ctx: PluginContext, config?: TConfig) => void | (() => void);\n}\n\n/**\n * 创建插件工厂的辅助函数\n *\n * @example\n * ```typescript\n * export const AgentPlugin = createPluginFactory<AgentPluginConfig>({\n * id: 'builtin.agent',\n * name: 'AI Assistant',\n * defaultConfig: {\n * provider: 'openai',\n * model: 'gpt-4',\n * },\n * activate: (ctx, config) => {\n * const dispose = ctx.capabilities.registerSidebarView({\n * id: 'sidebar.assistant',\n * component: AssistantView,\n * });\n * return dispose;\n * },\n * });\n * ```\n */\nexport function createPluginFactory<TConfig extends Record<string, any>>(\n definition: {\n id: string;\n name: string;\n version?: string;\n defaultConfig?: TConfig;\n activate: (ctx: PluginContext, config: TConfig) => void | (() => void);\n }\n): PluginModule<TConfig> {\n return {\n id: definition.id,\n name: definition.name,\n\n create: (config?: Partial<TConfig>) => {\n const finalConfig = { ...definition.defaultConfig, ...config } as TConfig;\n return {\n id: definition.id,\n name: definition.name,\n version: definition.version,\n config: finalConfig,\n activate: (ctx) => definition.activate(ctx, finalConfig),\n };\n },\n\n activate: (ctx, config) => {\n const finalConfig = { ...definition.defaultConfig, ...config } as TConfig;\n return definition.activate(ctx, finalConfig);\n },\n };\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types-BL0aIpQ1.js","sources":["../src/plugins/base/types.ts"],"sourcesContent":["/**\n * 插件系统基础类型定义\n *\n * @module plugins/base/types\n */\n\nexport type { PluginContext } from '@/core/PluginContext';\nexport { createPluginContext } from '@/core/PluginContext';\nimport type { PluginContext } from '@/core/PluginContext';\n\n// 扩展 badge 类型(配合 ctx.capabilities.setSidebarBadge / setEditorTabBadge 使用)\nexport type { ExtensionBadge, ExtensionBadgeTone } from '@/core/extensionBadges';\n\n/**\n * 插件实例接口\n */\nexport interface IPlugin<TConfig = Record<string, any>> {\n /** 插件唯一标识符 */\n id: string;\n /** 插件名称 */\n name: string;\n /** 插件版本 */\n version?: string;\n /** 插件配置 */\n config?: TConfig;\n /** 激活函数,返回可选的停用函数 */\n activate: (ctx: PluginContext) => void | (() => void);\n}\n\n/**\n * 插件工厂函数类型\n */\nexport type PluginFactory<TConfig = Record<string, any>> = (\n config?: Partial<TConfig>\n) => IPlugin<TConfig>;\n\n/**\n * 插件模块 - 定义插件的标准导出结构\n */\nexport interface PluginModule<TConfig = Record<string, any>> {\n /** 插件唯一标识符 */\n id: string;\n /** 插件名称 */\n name: string;\n /** 创建插件实例的工厂函数 */\n create: PluginFactory<TConfig>;\n /** 直接激活插件的函数 */\n activate: (ctx: PluginContext, config?: TConfig) => void | (() => void);\n}\n\n/**\n * 创建插件工厂的辅助函数\n *\n * @example\n * ```typescript\n * export const AgentPlugin = createPluginFactory<AgentPluginConfig>({\n * id: 'builtin.agent',\n * name: 'AI Assistant',\n * defaultConfig: {\n * provider: 'openai',\n * model: 'gpt-4',\n * },\n * activate: (ctx, config) => {\n * const dispose = ctx.capabilities.registerSidebarView({\n * id: 'sidebar.assistant',\n * component: AssistantView,\n * });\n * return dispose;\n * },\n * });\n * ```\n */\nexport function createPluginFactory<TConfig extends Record<string, any>>(\n definition: {\n id: string;\n name: string;\n version?: string;\n defaultConfig?: TConfig;\n activate: (ctx: PluginContext, config: TConfig) => void | (() => void);\n }\n): PluginModule<TConfig> {\n return {\n id: definition.id,\n name: definition.name,\n\n create: (config?: Partial<TConfig>) => {\n const finalConfig = { ...definition.defaultConfig, ...config } as TConfig;\n return {\n id: definition.id,\n name: definition.name,\n version: definition.version,\n config: finalConfig,\n activate: (ctx) => definition.activate(ctx, finalConfig),\n };\n },\n\n activate: (ctx, config) => {\n const finalConfig = { ...definition.defaultConfig, ...config } as TConfig;\n return definition.activate(ctx, finalConfig);\n },\n };\n}\n"],"names":[],"mappings":"AAwEO,SAAS,oBACd,YAOuB;AACvB,SAAO;AAAA,IACL,IAAI,WAAW;AAAA,IACf,MAAM,WAAW;AAAA,IAEjB,QAAQ,CAAC,WAA8B;AACrC,YAAM,cAAc,EAAE,GAAG,WAAW,eAAe,GAAG,OAAA;AACtD,aAAO;AAAA,QACL,IAAI,WAAW;AAAA,QACf,MAAM,WAAW;AAAA,QACjB,SAAS,WAAW;AAAA,QACpB,QAAQ;AAAA,QACR,UAAU,CAAC,QAAQ,WAAW,SAAS,KAAK,WAAW;AAAA,MAAA;AAAA,IAE3D;AAAA,IAEA,UAAU,CAAC,KAAK,WAAW;AACzB,YAAM,cAAc,EAAE,GAAG,WAAW,eAAe,GAAG,OAAA;AACtD,aAAO,WAAW,SAAS,KAAK,WAAW;AAAA,IAC7C;AAAA,EAAA;AAEJ;"}
|
package/dist/ui/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A, a, b, c, d, e, B, f, C, D, g, h, i, j, k, l, m, n, o, p, q, r, s, t, E, I, R, u, S, v, w, x, y, W, X, z, F, G, H, J, T, K, L, M, N, O, P, Q, U, V, Y } from "../skeleton-
|
|
1
|
+
import { A, a, b, c, d, e, B, f, C, D, g, h, i, j, k, l, m, n, o, p, q, r, s, t, E, I, R, u, S, v, w, x, y, W, X, z, F, G, H, J, T, K, L, M, N, O, P, Q, U, V, Y } from "../skeleton-6VSIwQtG.js";
|
|
2
2
|
import { P as P2, T as T2, a as a2, b as b2, c as c2, d as d2, e as e2, f as f2, g as g2, h as h2, i as i2, j as j2 } from "../toast-C4mLAjyT.js";
|
|
3
|
-
import { D as D2, a as a3, b as b3, c as c3, d as d3, e as e3, f as f3, g as g3, h as h3, i as i3 } from "../dialog-
|
|
4
|
-
import { S as S2, a as a4, b as b4, c as c4, d as d4, e as e4, f as f4, g as g4, h as h4, i as i4 } from "../sheet-
|
|
3
|
+
import { D as D2, a as a3, b as b3, c as c3, d as d3, e as e3, f as f3, g as g3, h as h3, i as i3 } from "../dialog-RPHf7Mz2.js";
|
|
4
|
+
import { S as S2, a as a4, b as b4, c as c4, d as d4, e as e4, f as f4, g as g4, h as h4, i as i4 } from "../sheet-tD__qqBd.js";
|
|
5
5
|
export {
|
|
6
6
|
A as WorkbenchAlert,
|
|
7
7
|
a as WorkbenchAlertDescription,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext, useState, useRef, useEffect } from "react";
|
|
2
|
-
import { b as FileSystemContext } from "./activate-
|
|
3
|
-
import { M as MAX_BINARY_PREVIEW_BYTES, g as getBinaryMime, B as BinaryAssetNotFoundError } from "./Workbench-
|
|
2
|
+
import { b as FileSystemContext } from "./activate-B_lpUEhD.js";
|
|
3
|
+
import { M as MAX_BINARY_PREVIEW_BYTES, g as getBinaryMime, B as BinaryAssetNotFoundError } from "./Workbench-Bz0iJPL8.js";
|
|
4
4
|
function base64ToBlob(base64, mime) {
|
|
5
5
|
const binary = atob(base64);
|
|
6
6
|
const bytes = new Uint8Array(binary.length);
|
|
@@ -76,4 +76,4 @@ function useBinaryFileUrl(file) {
|
|
|
76
76
|
export {
|
|
77
77
|
useBinaryFileUrl as u
|
|
78
78
|
};
|
|
79
|
-
//# sourceMappingURL=useBinaryFileUrl-
|
|
79
|
+
//# sourceMappingURL=useBinaryFileUrl-_FJREA5b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBinaryFileUrl-
|
|
1
|
+
{"version":3,"file":"useBinaryFileUrl-_FJREA5b.js","sources":["../src/plugins/binary-previews/useBinaryFileUrl.ts"],"sourcesContent":["/**\n * 二进制文件预览 URL 解析 hook。\n *\n * 通过 FileSystemContext 拿 Workbench 实际的 FileSystemService 实例\n * (存在模块单例与 WorkbenchProvider 实例双实例,绝不 import 单例)。\n * runtime:base64 → Blob → objectURL(切换/卸载时 revoke);\n * 云端:VFS 资产签名 URL(无需 revoke)。\n */\nimport { useContext, useEffect, useRef, useState } from 'react';\nimport { FileSystemContext } from '../../core/FileSystemContext';\nimport {\n BinaryAssetNotFoundError,\n type FileSystemService,\n} from '../explorer/services/fileSystem';\nimport type { FileNode } from '../../types';\nimport { getBinaryMime, MAX_BINARY_PREVIEW_BYTES } from './binaryTypes';\n\nexport type BinaryUrlState =\n | { status: 'loading' }\n | { status: 'ready'; url: string; kind: 'blob' | 'signed-url' }\n | { status: 'no-asset' }\n | { status: 'too-large'; size?: number }\n | { status: 'error'; message: string };\n\nfunction base64ToBlob(base64: string, mime: string): Blob {\n const binary = atob(base64);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i += 1) {\n bytes[i] = binary.charCodeAt(i);\n }\n return new Blob([bytes], { type: mime });\n}\n\nexport function useBinaryFileUrl(\n file: FileNode | null | undefined,\n): [BinaryUrlState, () => void] {\n const fileSystem = useContext(FileSystemContext) as FileSystemService | null;\n const [state, setState] = useState<BinaryUrlState>({ status: 'loading' });\n const [nonce, setNonce] = useState(0);\n // 当前持有的 blob: URL(签名 URL 不 revoke)\n const objectUrlRef = useRef<string | null>(null);\n const generationRef = useRef(0);\n\n const retry = () => setNonce((n) => n + 1);\n\n useEffect(() => {\n const generation = ++generationRef.current;\n\n // 释放上一个 blob URL(可能属于上一个文件)\n if (objectUrlRef.current) {\n URL.revokeObjectURL(objectUrlRef.current);\n objectUrlRef.current = null;\n }\n\n if (!file) {\n setState({ status: 'loading' });\n return;\n }\n if (!fileSystem) {\n setState({ status: 'error', message: '二进制预览需要工作台文件系统' });\n return;\n }\n const size = file.stats?.size;\n if (typeof size === 'number' && size > MAX_BINARY_PREVIEW_BYTES) {\n setState({ status: 'too-large', size });\n return;\n }\n\n let cancelled = false;\n setState({ status: 'loading' });\n\n (async () => {\n try {\n const source = await fileSystem.resolveBinarySource(file.id);\n if (cancelled || generation !== generationRef.current) return;\n\n if (source.kind === 'signed-url') {\n setState({ status: 'ready', url: source.url, kind: 'signed-url' });\n } else {\n const blob = base64ToBlob(source.base64, getBinaryMime(file.name) ?? 'application/octet-stream');\n const url = URL.createObjectURL(blob);\n objectUrlRef.current = url;\n setState({ status: 'ready', url, kind: 'blob' });\n }\n } catch (e) {\n if (cancelled || generation !== generationRef.current) return;\n if (e instanceof BinaryAssetNotFoundError) {\n setState({ status: 'no-asset' });\n } else {\n setState({ status: 'error', message: e instanceof Error ? e.message : String(e) });\n }\n }\n })();\n\n return () => {\n cancelled = true;\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fileSystem, file?.id, nonce]);\n\n // 卸载时释放 blob URL\n useEffect(() => {\n return () => {\n if (objectUrlRef.current) {\n URL.revokeObjectURL(objectUrlRef.current);\n objectUrlRef.current = null;\n }\n };\n }, []);\n\n return [state, retry];\n}\n"],"names":[],"mappings":";;;AAwBA,SAAS,aAAa,QAAgB,MAAoB;AACxD,QAAM,SAAS,KAAK,MAAM;AAC1B,QAAM,QAAQ,IAAI,WAAW,OAAO,MAAM;AAC1C,WAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK,GAAG;AACzC,UAAM,CAAC,IAAI,OAAO,WAAW,CAAC;AAAA,EAChC;AACA,SAAO,IAAI,KAAK,CAAC,KAAK,GAAG,EAAE,MAAM,MAAM;AACzC;AAEO,SAAS,iBACd,MAC8B;AAC9B,QAAM,aAAa,WAAW,iBAAiB;AAC/C,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAyB,EAAE,QAAQ,WAAW;AACxE,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,CAAC;AAEpC,QAAM,eAAe,OAAsB,IAAI;AAC/C,QAAM,gBAAgB,OAAO,CAAC;AAE9B,QAAM,QAAQ,MAAM,SAAS,CAAC,MAAM,IAAI,CAAC;AAEzC,YAAU,MAAM;;AACd,UAAM,aAAa,EAAE,cAAc;AAGnC,QAAI,aAAa,SAAS;AACxB,UAAI,gBAAgB,aAAa,OAAO;AACxC,mBAAa,UAAU;AAAA,IACzB;AAEA,QAAI,CAAC,MAAM;AACT,eAAS,EAAE,QAAQ,WAAW;AAC9B;AAAA,IACF;AACA,QAAI,CAAC,YAAY;AACf,eAAS,EAAE,QAAQ,SAAS,SAAS,kBAAkB;AACvD;AAAA,IACF;AACA,UAAM,QAAO,UAAK,UAAL,mBAAY;AACzB,QAAI,OAAO,SAAS,YAAY,OAAO,0BAA0B;AAC/D,eAAS,EAAE,QAAQ,aAAa,KAAA,CAAM;AACtC;AAAA,IACF;AAEA,QAAI,YAAY;AAChB,aAAS,EAAE,QAAQ,WAAW;AAE9B,KAAC,YAAY;AACX,UAAI;AACF,cAAM,SAAS,MAAM,WAAW,oBAAoB,KAAK,EAAE;AAC3D,YAAI,aAAa,eAAe,cAAc,QAAS;AAEvD,YAAI,OAAO,SAAS,cAAc;AAChC,mBAAS,EAAE,QAAQ,SAAS,KAAK,OAAO,KAAK,MAAM,cAAc;AAAA,QACnE,OAAO;AACL,gBAAM,OAAO,aAAa,OAAO,QAAQ,cAAc,KAAK,IAAI,KAAK,0BAA0B;AAC/F,gBAAM,MAAM,IAAI,gBAAgB,IAAI;AACpC,uBAAa,UAAU;AACvB,mBAAS,EAAE,QAAQ,SAAS,KAAK,MAAM,QAAQ;AAAA,QACjD;AAAA,MACF,SAAS,GAAG;AACV,YAAI,aAAa,eAAe,cAAc,QAAS;AACvD,YAAI,aAAa,0BAA0B;AACzC,mBAAS,EAAE,QAAQ,YAAY;AAAA,QACjC,OAAO;AACL,mBAAS,EAAE,QAAQ,SAAS,SAAS,aAAa,QAAQ,EAAE,UAAU,OAAO,CAAC,EAAA,CAAG;AAAA,QACnF;AAAA,MACF;AAAA,IACF,GAAA;AAEA,WAAO,MAAM;AACX,kBAAY;AAAA,IACd;AAAA,EAEF,GAAG,CAAC,YAAY,6BAAM,IAAI,KAAK,CAAC;AAGhC,YAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,aAAa,SAAS;AACxB,YAAI,gBAAgB,aAAa,OAAO;AACxC,qBAAa,UAAU;AAAA,MACzB;AAAA,IACF;AAAA,EACF,GAAG,CAAA,CAAE;AAEL,SAAO,CAAC,OAAO,KAAK;AACtB;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ExtensionBadge } from '../core/extensionBadges';
|
|
2
|
+
/**
|
|
3
|
+
* 扩展 badge 的统一视觉:
|
|
4
|
+
* - count/text 渲染为数字/文本胶囊;
|
|
5
|
+
* - dot 渲染为圆点;
|
|
6
|
+
* - 颜色消费主题 token(default tone)或固定 tone 色值。
|
|
7
|
+
*/
|
|
8
|
+
export declare function ExtensionBadgeMark({ badge }: {
|
|
9
|
+
badge: ExtensionBadge;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -23,7 +23,11 @@ interface LayoutSystemProps {
|
|
|
23
23
|
dirtyFileIds: string[];
|
|
24
24
|
/** Close editor view (for virtual views) */
|
|
25
25
|
onCloseEditorView?: (fileId: string) => void;
|
|
26
|
+
/** 协同面板展开的对话分组:该分组在 row split 中整体加宽(借并排分组空间) */
|
|
27
|
+
expandedConversationGroupId?: number | null;
|
|
26
28
|
compact?: boolean;
|
|
29
|
+
/** 卡片式布局(飞书/TRAE 家族):pill 标签、无硬边框、分层靠底色 */
|
|
30
|
+
cardLayout?: boolean;
|
|
27
31
|
/** Show the mobile return-to-extension action before the tab list. */
|
|
28
32
|
showReturnToPanel?: boolean;
|
|
29
33
|
onReturnToPanel?: () => void;
|
|
@@ -14,6 +14,10 @@ export interface MonacoEditorController {
|
|
|
14
14
|
getValue: () => string;
|
|
15
15
|
}
|
|
16
16
|
export declare const configureMonaco: (monaco: any) => void;
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* 工作台主题 → Monaco 编辑器主题。主题(家族)与模式正交:同一主题的
|
|
19
|
+
* 日/夜两面映射到不同的 Monaco 主题。
|
|
20
|
+
*/
|
|
21
|
+
export declare const getMonacoThemeForWorkbenchTheme: (themeId: string, mode?: "light" | "dark") => "vs" | "vs-dark" | "appthen-theme" | "appthen-light-theme" | "vercel-theme" | "vercel-light-theme" | "feishu-light-theme" | "feishu-theme" | "trae-theme" | "trae-light-theme";
|
|
18
22
|
export declare const MonacoWrapper: React.FC<MonacoWrapperProps>;
|
|
19
23
|
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 扩展 badge 体系:
|
|
3
|
+
* - 扩展通过 SDK(ExtensionCapabilities.setSidebarBadge / setEditorTabBadge)写入;
|
|
4
|
+
* - 宿主在 Activity Bar 按钮与编辑器页签上消费;
|
|
5
|
+
* - 存储为模块级 Map(复刻 runtimeActor 的轻量 store 模式),不侵入 extensionRegistry。
|
|
6
|
+
*/
|
|
7
|
+
export type ExtensionBadgeTone = 'default' | 'danger' | 'warning' | 'success' | 'info';
|
|
8
|
+
export interface ExtensionBadge {
|
|
9
|
+
/** 数字提示(如未读数),>99 显示为 99+;0 视为不显示数字 */
|
|
10
|
+
count?: number;
|
|
11
|
+
/** 短文本提示(如 “新”),建议 ≤4 字符 */
|
|
12
|
+
text?: string;
|
|
13
|
+
/** 仅圆点提示 */
|
|
14
|
+
dot?: boolean;
|
|
15
|
+
/** 色调,缺省 default(跟随主题 badge token) */
|
|
16
|
+
tone?: ExtensionBadgeTone;
|
|
17
|
+
}
|
|
18
|
+
export type ExtensionBadgeKind = 'sidebar' | 'tab';
|
|
19
|
+
type BadgeListener = () => void;
|
|
20
|
+
/** 与内部 store key 一致,供宿主按扩展归属跟踪 badge 用。 */
|
|
21
|
+
export declare const getExtensionBadgeStoreKey: (kind: ExtensionBadgeKind, viewId: string, key?: string) => string;
|
|
22
|
+
/** 写入或清除 badge(badge 传 null 清除)。返回 dispose(再次调用等价于清除)。 */
|
|
23
|
+
export declare function setExtensionBadge(kind: ExtensionBadgeKind, viewId: string, key: string | undefined, badge: ExtensionBadge | null | undefined): () => void;
|
|
24
|
+
export declare function getExtensionBadge(kind: ExtensionBadgeKind, viewId: string | undefined, key?: string): ExtensionBadge | null;
|
|
25
|
+
export declare function subscribeExtensionBadges(listener: BadgeListener): () => void;
|
|
26
|
+
/** 清空某扩展 viewId 相关的全部 badge(扩展停用/卸载时由宿主调用)。 */
|
|
27
|
+
export declare function clearExtensionBadgesForView(viewId: string): void;
|
|
28
|
+
export declare const clearAllExtensionBadges: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* 解析扩展虚拟 tab 的 fileId(`view://{viewId}/{key}`)。
|
|
31
|
+
* 非虚拟 tab(常规文件、workbench home 等)返回 null。
|
|
32
|
+
*/
|
|
33
|
+
export declare function parseVirtualViewFileId(fileId: string): {
|
|
34
|
+
viewId: string;
|
|
35
|
+
key: string;
|
|
36
|
+
} | null;
|
|
37
|
+
export declare const formatBadgeCount: (count: number) => string;
|
|
38
|
+
export declare const EXTENSION_BADGE_TONE_COLORS: Record<ExtensionBadgeTone, {
|
|
39
|
+
background: string;
|
|
40
|
+
foreground: string;
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* 消费扩展 badge。viewId 未提供时稳定返回 null(避免条件 hook)。
|
|
44
|
+
* getSnapshot 返回 Map 中存储的同一对象引用,仅在 set 替换时变化。
|
|
45
|
+
*/
|
|
46
|
+
export declare function useExtensionBadge(kind: ExtensionBadgeKind, viewId?: string, key?: string): ExtensionBadge | null;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,6 +11,12 @@ export interface ExtensionViews {
|
|
|
11
11
|
openMain(viewId: string, props?: Record<string, unknown>): void;
|
|
12
12
|
openEditor(input: OpenEditorViewInput): string;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* 编辑器 tab key 的宿主规范化规则:fileId(view://{viewId}/{key})与
|
|
16
|
+
* 扩展 badge(setEditorTabBadge)都使用同一规则,保证读写两侧 storeKey 一致。
|
|
17
|
+
* 注意:`.` 会替换为 `_`(与 URL tabKey 的表现形式一致)。
|
|
18
|
+
*/
|
|
19
|
+
export declare function normalizeEditorTabKey(key: string): string;
|
|
14
20
|
interface WorkspaceEditorServiceLike {
|
|
15
21
|
createViewFile(viewId: string, title: string, props: Record<string, unknown>, key?: string): {
|
|
16
22
|
id: string;
|
|
@@ -4,6 +4,8 @@ import { UIResourceRegistration } from './ui-resource';
|
|
|
4
4
|
import { RuntimeActorContext } from './runtimeActor';
|
|
5
5
|
import { IEnhancedExtensionManifest } from './ExtensionManifestSchema';
|
|
6
6
|
import { ExtensionAccessPolicy } from './extensionAccessPolicy';
|
|
7
|
+
import { ExtensionBadge } from './extensionBadges';
|
|
8
|
+
export type { ExtensionBadge, ExtensionBadgeTone } from './extensionBadges';
|
|
7
9
|
export interface ExtensionCapabilityRegistrationOptions {
|
|
8
10
|
accessPolicy?: ExtensionAccessPolicy;
|
|
9
11
|
routeKey?: string;
|
|
@@ -68,7 +70,20 @@ export interface ExtensionCapabilities {
|
|
|
68
70
|
registerFrontendTool(tool: FrontendToolRegistration): () => void;
|
|
69
71
|
registerFrontendToolHandler(handler: FrontendToolHandlerRegistration): () => void;
|
|
70
72
|
registerContribution(point: string, id: string, data: unknown, options?: ExtensionCapabilityRegistrationOptions): () => void;
|
|
73
|
+
/** 为本扩展的侧边栏入口按钮设置 badge;badge 传 null 清除。返回 dispose。 */
|
|
74
|
+
setSidebarBadge(input: {
|
|
75
|
+
viewId: string;
|
|
76
|
+
badge: ExtensionBadge | null;
|
|
77
|
+
}): () => void;
|
|
78
|
+
/** 为本扩展打开的编辑器页签(view://{viewId}/{key})设置 badge;badge 传 null 清除。返回 dispose。 */
|
|
79
|
+
setEditorTabBadge(input: {
|
|
80
|
+
viewId: string;
|
|
81
|
+
key?: string;
|
|
82
|
+
badge: ExtensionBadge | null;
|
|
83
|
+
}): () => void;
|
|
71
84
|
}
|
|
85
|
+
/** 扩展停用/卸载时由宿主调用:清除该扩展写入的全部 badge。 */
|
|
86
|
+
export declare function clearExtensionBadgesForOwner(extensionId: string): void;
|
|
72
87
|
export declare function getRegisteredFrontendTools(): {
|
|
73
88
|
name: string;
|
|
74
89
|
description: string;
|
|
@@ -22,6 +22,7 @@ export { DEFAULT_AGENT_CONFIG } from './plugins/agent/config';
|
|
|
22
22
|
export * from './plugins/workspace-agent/channel-client';
|
|
23
23
|
export * from './worker';
|
|
24
24
|
export { ExtensionRegistry, extensionRegistry } from './core/extensionRegistry';
|
|
25
|
+
export type { ExtensionBadge, ExtensionBadgeTone } from './core/extensionBadges';
|
|
25
26
|
export { FileSystemService } from './plugins/explorer/services/fileSystem';
|
|
26
27
|
export { FileSystemContext } from './core/FileSystemContext';
|
|
27
28
|
export { globalEventBus } from './core/events';
|
|
@@ -6,6 +6,7 @@ import { PluginContext } from '../../core/PluginContext';
|
|
|
6
6
|
*/
|
|
7
7
|
export type { PluginContext } from '../../core/PluginContext';
|
|
8
8
|
export { createPluginContext } from '../../core/PluginContext';
|
|
9
|
+
export type { ExtensionBadge, ExtensionBadgeTone } from '../../core/extensionBadges';
|
|
9
10
|
/**
|
|
10
11
|
* 插件实例接口
|
|
11
12
|
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ResolvedSlot } from '../../types/panelConfig.types';
|
|
2
|
+
export interface ComponentDockBarProps {
|
|
3
|
+
/** 解析后的槽位列表(与右侧面板同源) */
|
|
4
|
+
resolvedSlots: ResolvedSlot[];
|
|
5
|
+
}
|
|
6
|
+
export declare function ComponentDockBar({ resolvedSlots }: ComponentDockBarProps): import("react").JSX.Element;
|
|
@@ -5,7 +5,9 @@ export interface DynamicComponentZoneProps {
|
|
|
5
5
|
resolvedSlots: ResolvedSlot[];
|
|
6
6
|
/** 区域底部预留内容(如「最近动态」);缺省不渲染 */
|
|
7
7
|
footerSlot?: ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** 空态标题;缺省「暂无业务组件」 */
|
|
9
|
+
emptyTitle?: string;
|
|
10
|
+
/** 空态说明文案;缺省为通用引导 */
|
|
11
|
+
emptyHint?: string;
|
|
10
12
|
}
|
|
11
|
-
export declare function DynamicComponentZone({ resolvedSlots, footerSlot,
|
|
13
|
+
export declare function DynamicComponentZone({ resolvedSlots, footerSlot, emptyTitle, emptyHint, }: DynamicComponentZoneProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
import { PanelComponentSlot, ResolvedSlot } from '../../types/panelConfig.types';
|
|
2
3
|
export interface PanelSlotCardProps {
|
|
3
4
|
/** 解析后槽位(含三态 status 与 ready 时的组件/运行时上下文) */
|
|
4
5
|
resolved: ResolvedSlot;
|
|
5
6
|
}
|
|
7
|
+
/** slot.icon 标识 → 图标组件(未命中回退通用图标);供吸附条等场景复用 */
|
|
8
|
+
export declare function getSlotIcon(icon?: string): LucideIcon;
|
|
9
|
+
/** 槽位展示标题:title 优先,缺省回退 componentKey */
|
|
10
|
+
export declare function getSlotTitle(slot: PanelComponentSlot): string;
|
|
6
11
|
export declare function PanelSlotCard({ resolved }: PanelSlotCardProps): JSX.Element;
|
|
@@ -22,7 +22,6 @@ export interface ParticipantBarProps {
|
|
|
22
22
|
className?: string;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* 外部 viewer 时仅渲染必要成员子集;内部 viewer 渲染完整参与者列表。
|
|
25
|
+
* 参与者列表:Agent 排前(渐变头像成组识别),成员随后,排序稳定不抖动。
|
|
27
26
|
*/
|
|
28
27
|
export declare function ParticipantBar({ participants, participantStatusMap, isExternalViewer: isExternalViewerProp, viewer, messages, onAdd, onRemove, onAgentClick, addButtonLabel, className, }: ParticipantBarProps): import("react").JSX.Element;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ParticipantBarItem —— 参与者/Agent
|
|
2
|
+
* ParticipantBarItem —— 参与者/Agent 行项(R-1)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* 角色徽标(Agent
|
|
4
|
+
* 纯展示组件:头像(Agent 渐变 / 成员确定性色调)+ 右下角状态点 + 名称 +
|
|
5
|
+
* 角色徽标(Agent / 外部)+ Agent 运行指示 + hover 移除入口。
|
|
6
6
|
* 数据由父组件(ParticipantBar / ConversationHubView 编排层)传入,不自行取数。
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
*
|
|
13
|
-
* - 外部徽标:amber(对齐 ExternalGroupBanner.tsx:27-35)
|
|
8
|
+
* 视觉体系:
|
|
9
|
+
* - Agent:sky → indigo 渐变头像 + Sparkles 徽标,一眼可辨;
|
|
10
|
+
* - 成员:按 subjectId 哈希取确定性色调,颜色稳定不随渲染顺序漂移;
|
|
11
|
+
* - 手机号等纯数字名:展示层脱敏(139****0099),头像回退「用户」;
|
|
12
|
+
* - 状态点:右下角(对齐 Slack/Discord 习惯),typing/agent-running 带脉冲。
|
|
14
13
|
*/
|
|
15
14
|
/** 参与者在线状态(与 ConversationHubView 现有 typing / presence 语义对齐) */
|
|
16
15
|
export type ParticipantBarStatus = 'online' | 'typing' | 'agent-running' | 'offline';
|
|
@@ -29,20 +28,22 @@ export interface ParticipantBarItemProps {
|
|
|
29
28
|
participant: ParticipantBarParticipant;
|
|
30
29
|
/** 在线状态;缺省为 offline(灰点) */
|
|
31
30
|
status?: ParticipantBarStatus;
|
|
32
|
-
/**
|
|
31
|
+
/** 点击整行回调(Agent 常由 ParticipantBar 路由到 onAgentClick) */
|
|
33
32
|
onClick?: () => void;
|
|
34
|
-
/** 移除回调(showRemove 为 true
|
|
33
|
+
/** 移除回调(showRemove 为 true 时 hover 显示移除按钮) */
|
|
35
34
|
onRemove?: () => void;
|
|
36
35
|
/** 是否显示移除按钮 */
|
|
37
36
|
showRemove?: boolean;
|
|
38
37
|
className?: string;
|
|
39
38
|
}
|
|
40
39
|
/**
|
|
41
|
-
*
|
|
40
|
+
* 首字圆回退:中文取前两字(对齐微信/飞书群头像习惯),纯数字(手机号)回退「用户」。
|
|
42
41
|
* 保留在组件内(而非从编排视图导入)以避免巨型视图模块作为展示组件依赖。
|
|
43
42
|
*/
|
|
44
43
|
export declare function getParticipantInitials(label: string): string;
|
|
45
|
-
/**
|
|
44
|
+
/** 展示名脱敏:11 位手机号 → 139****0099(与顶栏当前用户展示口径一致) */
|
|
45
|
+
export declare function formatParticipantLabel(label: string): string;
|
|
46
|
+
/** 安全读取 subjectSnapshot(缺字段容错) */
|
|
46
47
|
export declare function readParticipantSnapshot(participant: ParticipantBarParticipant): {
|
|
47
48
|
label: string;
|
|
48
49
|
classId: string;
|
|
@@ -51,8 +52,10 @@ export declare function readParticipantSnapshot(participant: ParticipantBarParti
|
|
|
51
52
|
};
|
|
52
53
|
/** Agent 判定(isAgent 标记 / agentProfile / classId 命中,单一来源 readParticipantSnapshot) */
|
|
53
54
|
export declare function isAgentParticipant(participant: ParticipantBarParticipant): boolean;
|
|
55
|
+
/** 头像样式类(Agent 渐变 / 成员确定性色调),供行项与 banner 头像堆叠复用 */
|
|
56
|
+
export declare function getParticipantAvatarClass(subjectId: string, isAgent: boolean): string;
|
|
54
57
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
58
|
+
* 单参与者行:头像(含右下角状态点)+ 名称 + 运行指示 + 角色徽标 + hover 移除入口。
|
|
59
|
+
* 全宽行式布局(对齐 Linear/Slack 详情面板),名称不再被 76px 卡宽截断。
|
|
57
60
|
*/
|
|
58
61
|
export declare function ParticipantBarItem({ participant, status, onClick, onRemove, showRemove, className, }: ParticipantBarItemProps): import("react").JSX.Element;
|
|
@@ -49,7 +49,20 @@ export interface ConversationHubShellResources {
|
|
|
49
49
|
subjectClasses?: Array<Partial<SubjectClass> & Record<string, any>>;
|
|
50
50
|
subjects?: Array<Record<string, any>>;
|
|
51
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* 清洗会话标题里的 namespace 技术前缀(如 "default / 科研检测服务群" → "科研检测服务群")。
|
|
54
|
+
* 仅匹配小写字母开头、全小写的 namespace 段,避免误伤 "AI / ML 研究组" 这类正常标题。
|
|
55
|
+
* 历史会话的标题在创建时被拼接了 `${namespace} / ${label}`,展示层统一走这里兜底。
|
|
56
|
+
*/
|
|
57
|
+
export declare function cleanConversationHubTitle(label: string): string;
|
|
52
58
|
export declare function getConversationHubInitials(label: string): string;
|
|
53
59
|
export declare function getConversationHubRelativeTimeLabel(message: ConversationMessageRecord | null): string;
|
|
54
60
|
export declare function getConversationHubMessagePreview(message: ConversationMessageRecord | null): string;
|
|
55
|
-
|
|
61
|
+
/** 运行时真实登录用户(来自 JWT actor),用于替代隐式占位发送者 */
|
|
62
|
+
export interface ConversationHubRuntimeHumanSubject {
|
|
63
|
+
subjectId: string;
|
|
64
|
+
classId?: string;
|
|
65
|
+
displayName?: string;
|
|
66
|
+
avatar?: string;
|
|
67
|
+
}
|
|
68
|
+
export declare function buildConversationHubShell(tenantId: string, namespace?: string, resources?: ConversationHubShellResources, runtimeHuman?: ConversationHubRuntimeHumanSubject): ConversationHubShellState;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { ConversationHubShellState } from '../conversationHubShell';
|
|
1
|
+
import { ConversationHubRuntimeHumanSubject, ConversationHubShellState } from '../conversationHubShell';
|
|
2
2
|
interface ResolveConversationHubShellStateInput {
|
|
3
3
|
tenantId: string;
|
|
4
4
|
namespace?: string;
|
|
5
5
|
conversationTypeId?: string;
|
|
6
|
+
/** 运行时真实登录用户;传入后作为 shell 首个主体(默认发送者) */
|
|
7
|
+
runtimeHuman?: ConversationHubRuntimeHumanSubject;
|
|
6
8
|
}
|
|
7
9
|
export declare function resolveConversationHubShellState(input: ResolveConversationHubShellStateInput): Promise<ConversationHubShellState>;
|
|
8
10
|
export {};
|
|
@@ -17,28 +17,102 @@ export interface ITheme {
|
|
|
17
17
|
rules?: Array<Record<string, string>>;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
export
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
20
|
+
export type ThemeMode = 'light' | 'dark';
|
|
21
|
+
export declare const AppThenDarkTheme: ITheme;
|
|
22
|
+
export declare const VercelDarkTheme: ITheme;
|
|
23
|
+
export declare const VercelLightTheme: ITheme;
|
|
24
|
+
export declare const VscodeDarkTheme: ITheme;
|
|
23
25
|
export declare const AppThenLightTheme: ITheme;
|
|
24
|
-
export declare const
|
|
26
|
+
export declare const VscodeLightTheme: ITheme;
|
|
25
27
|
export declare const MarmosLightTheme: ITheme;
|
|
26
28
|
export declare const MarmosDarkTheme: ITheme;
|
|
29
|
+
export declare const FeishuLightTheme: ITheme;
|
|
30
|
+
export declare const FeishuDarkTheme: ITheme;
|
|
31
|
+
export declare const TraeDarkTheme: ITheme;
|
|
32
|
+
export declare const TraeLightTheme: ITheme;
|
|
33
|
+
/**
|
|
34
|
+
* 主题布局令牌:主题不只定义色彩,也定义工作台的结构层次。
|
|
35
|
+
* flat = 经典 VS Code 平铺(边框分隔、零间隙);
|
|
36
|
+
* card = 卡片式浮起布局(画布留白 + 面板间隙 + 圆角浮卡,飞书/TRAE 风格)。
|
|
37
|
+
*/
|
|
38
|
+
export interface IThemeLayout {
|
|
39
|
+
style: 'flat' | 'card';
|
|
40
|
+
/** 面板之间的间隙(px) */
|
|
41
|
+
gap: number;
|
|
42
|
+
/** 画布四周留白(px) */
|
|
43
|
+
padding: number | string;
|
|
44
|
+
/** 浮卡圆角(px) */
|
|
45
|
+
radius: number;
|
|
46
|
+
}
|
|
47
|
+
export declare const FlatLayout: IThemeLayout;
|
|
48
|
+
/**
|
|
49
|
+
* 主题家族:一个主题的日/夜两个变体。主题(家族)与显示模式(light/dark)
|
|
50
|
+
* 是正交维度——用户选主题风格,模式由独立开关切换,每个主题都有双面。
|
|
51
|
+
*/
|
|
52
|
+
export interface IThemeFamily {
|
|
53
|
+
id: string;
|
|
54
|
+
label: string;
|
|
55
|
+
dark: ITheme;
|
|
56
|
+
light: ITheme;
|
|
57
|
+
/** 布局令牌:缺省为 flat 平铺 */
|
|
58
|
+
layout?: IThemeLayout;
|
|
59
|
+
}
|
|
60
|
+
/** 产品出厂默认主题家族:飞书。工作台未配置默认主题时的兜底,主题列表中排第一。 */
|
|
61
|
+
export declare const DefaultThemeFamilyId: string;
|
|
27
62
|
export declare class ThemeService {
|
|
28
|
-
private
|
|
63
|
+
private family;
|
|
64
|
+
private mode;
|
|
29
65
|
private listeners;
|
|
30
66
|
private customThemes;
|
|
67
|
+
/** 工作台配置的默认主题家族 id,仅用于主题列表排序(默认排第一)。 */
|
|
68
|
+
private configDefaultFamilyId?;
|
|
31
69
|
constructor();
|
|
32
70
|
registerTheme(theme: ITheme): boolean;
|
|
33
71
|
registerThemes(themes: ITheme[]): void;
|
|
72
|
+
/** 选择主题(家族维度)。接受家族 id 或旧单面 id;模式不受影响。 */
|
|
34
73
|
setTheme(themeId: string): void;
|
|
35
74
|
setUserTheme(themeId: string): void;
|
|
75
|
+
/** 独立的日/夜开关:只切模式,不动主题。 */
|
|
76
|
+
setUserMode(mode: ThemeMode): void;
|
|
77
|
+
toggleUserMode(): void;
|
|
78
|
+
/** 用户存储的偏好主题(家族 id;含旧值迁移)。 */
|
|
36
79
|
getPreferredThemeId(): string;
|
|
80
|
+
/** 当前应用态主题(面内容 + 家族 id/label)。 */
|
|
37
81
|
getCurrentTheme(): ITheme;
|
|
38
|
-
|
|
82
|
+
getCurrentMode(): ThemeMode;
|
|
83
|
+
getCurrentFamilyId(): string;
|
|
84
|
+
/** 当前家族的布局令牌(无定义时回退 flat 平铺)。 */
|
|
85
|
+
getCurrentLayout(): IThemeLayout;
|
|
86
|
+
/** 可用主题家族;工作台配置的默认主题始终排第一,其余保持内置顺序。 */
|
|
87
|
+
getAvailableFamilies(): IThemeFamily[];
|
|
88
|
+
/** 产品出厂默认主题家族 id(飞书)。工作台配置未指定默认主题时作为排序兜底。 */
|
|
89
|
+
getFactoryDefaultFamilyId(): string;
|
|
90
|
+
/**
|
|
91
|
+
* 记录工作台配置的默认主题(接受家族 id / 旧单面 id)。
|
|
92
|
+
* 只影响主题列表排序(默认排第一),不改变当前生效主题。
|
|
93
|
+
*/
|
|
94
|
+
setConfigDefaultTheme(themeId?: string | null): void;
|
|
95
|
+
/** 将任意主题 id(家族 id / 旧单面 id / 自定义 id)规范化为家族 id;无法识别时原样返回。 */
|
|
96
|
+
normalizeToFamilyId(themeId: string): string;
|
|
39
97
|
private registerThemeWithoutNotify;
|
|
98
|
+
/**
|
|
99
|
+
* 读取并迁移存储偏好:theme key 存家族 id,mode key 存显示模式。
|
|
100
|
+
* 旧单面值(如 'appthen-light')在迁移时换算成家族 + 模式并写回。
|
|
101
|
+
*/
|
|
102
|
+
private readStoredPreference;
|
|
103
|
+
/** 解析任意主题 id(家族 id / 旧单面 id / 自定义主题 id)为家族。 */
|
|
104
|
+
private resolveThemeId;
|
|
105
|
+
private resolveFamily;
|
|
106
|
+
/**
|
|
107
|
+
* 自定义主题(扩展注册的单面 ITheme)合成家族:缺的那一面用 AppThen
|
|
108
|
+
* 对应面兜底,保证日/夜开关对任何主题都有效。
|
|
109
|
+
*/
|
|
110
|
+
private synthCustomFamily;
|
|
111
|
+
private customFamilies;
|
|
112
|
+
/** 单面主题解析(含 extends 合并),供自定义主题与扩展契约使用。 */
|
|
40
113
|
private resolveTheme;
|
|
41
|
-
private
|
|
114
|
+
private currentFace;
|
|
115
|
+
private applyCurrentTheme;
|
|
42
116
|
onThemeChange(callback: () => void): () => void;
|
|
43
117
|
}
|
|
44
118
|
export declare const themeService: ThemeService;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from '../../../node_modules/.pnpm/react@18.3.1/node_modules/react';
|
|
2
|
+
export declare const USER_NAME_UPDATED_EVENT = "workbench:user-name-updated";
|
|
3
|
+
export declare function WorkbenchAccountMenu({ compact }: {
|
|
4
|
+
compact?: boolean;
|
|
5
|
+
}): React.JSX.Element;
|