@h-ai/ui 1.0.0-beta.30 → 1.0.0-beta.31
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/README.en.md +10 -1183
- package/README.ja.md +9 -1182
- package/README.md +12 -1183
- package/auto-import.d.ts +4 -0
- package/auto-import.js +4 -0
- package/dist/components/compounds/Popover.svelte +1 -0
- package/dist/components/scenes/ai/AiDocumentEditor.svelte +73 -7
- package/dist/components/scenes/ai/document-download.js +49 -86
- package/dist/components/scenes/ai/document-parse.js +6 -28
- package/dist/components/scenes/ai/document-pdf-pages.d.ts +26 -0
- package/dist/components/scenes/ai/document-pdf-pages.js +111 -0
- package/dist/components/scenes/ai/document-pdf-worker.d.ts +11 -0
- package/dist/components/scenes/ai/document-pdf-worker.js +29 -0
- package/dist/components/scenes/ai/document-render-pool.d.ts +19 -0
- package/dist/components/scenes/ai/document-render-pool.js +20 -0
- package/dist/components/scenes/ai/document-render-worker.d.ts +13 -0
- package/dist/components/scenes/ai/document-render-worker.js +7 -0
- package/dist/components/scenes/ai/document-types.d.ts +2 -0
- package/dist/components/scenes/ai/index.d.ts +3 -0
- package/dist/components/scenes/ai/index.js +2 -0
- package/dist/components/scenes/ai/mind/AiMindMapEditor.svelte +519 -0
- package/dist/components/scenes/ai/mind/AiMindMapEditor.svelte.d.ts +8 -0
- package/dist/components/scenes/ai/mind/mind-adapter.d.ts +38 -0
- package/dist/components/scenes/ai/mind/mind-adapter.js +59 -0
- package/dist/components/scenes/ai/mind/mind-types.d.ts +116 -0
- package/dist/components/scenes/ai/mind/mind-types.js +1 -0
- package/dist/components/scenes/index.d.ts +1 -0
- package/dist/components/scenes/index.js +2 -0
- package/dist/components/scenes/tools/ArtifactWorkspace.svelte +561 -0
- package/dist/components/scenes/tools/ArtifactWorkspace.svelte.d.ts +17 -0
- package/dist/components/scenes/tools/ToolWorkspace.svelte +435 -0
- package/dist/components/scenes/tools/ToolWorkspace.svelte.d.ts +17 -0
- package/dist/components/scenes/tools/artifact-data.d.ts +35 -0
- package/dist/components/scenes/tools/artifact-data.js +127 -0
- package/dist/components/scenes/tools/artifact-markdown.d.ts +58 -0
- package/dist/components/scenes/tools/artifact-markdown.js +308 -0
- package/dist/components/scenes/tools/artifact-preview.d.ts +9 -0
- package/dist/components/scenes/tools/artifact-preview.js +31 -0
- package/dist/components/scenes/tools/index.d.ts +4 -0
- package/dist/components/scenes/tools/index.js +3 -0
- package/dist/components/scenes/tools/tool-form.d.ts +74 -0
- package/dist/components/scenes/tools/tool-form.js +179 -0
- package/dist/components/scenes/tools/workspace-types.d.ts +221 -0
- package/dist/components/scenes/tools/workspace-types.js +1 -0
- package/dist/messages/en-US.json +99 -1
- package/dist/messages/ja-JP.json +99 -1
- package/dist/messages/zh-CN.json +99 -1
- package/package.json +8 -2
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import type { DataAttributes } from '../../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* 产物的展示类型;授权、存储和版本由宿主维护。
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import type { ArtifactKind } from '@h-ai/ui'
|
|
7
|
+
* const kind: ArtifactKind = 'markdown'
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
export type ArtifactKind = 'markdown' | 'html' | 'table' | 'chart' | 'image' | 'audio' | 'video' | 'file';
|
|
11
|
+
/**
|
|
12
|
+
* 可供浏览和选择的产物版本摘要;version 与 Git revision 无关。
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import type { ArtifactSummary } from '@h-ai/ui'
|
|
16
|
+
* const item: ArtifactSummary = { id: 'report', title: '报告', kind: 'markdown', version: 1 }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export interface ArtifactSummary {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
kind: ArtifactKind;
|
|
23
|
+
version: number;
|
|
24
|
+
mediaType?: string;
|
|
25
|
+
updatedAt?: number;
|
|
26
|
+
editable?: boolean;
|
|
27
|
+
downloadUrl?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 读取完成的产物;表格和图表的 content 是结构化 JSON,媒体通过授权 URL 加载。
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* import type { ArtifactDocument } from '@h-ai/ui'
|
|
34
|
+
* const item: ArtifactDocument = { id: 'report', title: '报告', kind: 'markdown', version: 1, content: '# 简介' }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export interface ArtifactDocument extends ArtifactSummary {
|
|
38
|
+
content?: string;
|
|
39
|
+
mediaUrl?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 基于已读取版本保存,不能将冲突静默当作保存成功。
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* import type { ArtifactSaveRequest } from '@h-ai/ui'
|
|
46
|
+
* const request: ArtifactSaveRequest = { id: 'report', baseVersion: 1, content: '# 更新' }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export interface ArtifactSaveRequest {
|
|
50
|
+
id: string;
|
|
51
|
+
baseVersion: number;
|
|
52
|
+
content: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 新建可编辑产物;内容模板由组件提供,持久化和授权由宿主实现。
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* import type { ArtifactCreateRequest } from '@h-ai/ui'
|
|
59
|
+
* const request: ArtifactCreateRequest = { title: '报告', kind: 'markdown', content: '# 报告' }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export interface ArtifactCreateRequest {
|
|
63
|
+
title: string;
|
|
64
|
+
kind: 'markdown' | 'html' | 'table' | 'chart';
|
|
65
|
+
content: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 保存成功返回新版本;冲突时保留本地草稿并显示当前版本。
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* import type { ArtifactSaveResponse } from '@h-ai/ui'
|
|
72
|
+
* const response: ArtifactSaveResponse = { status: 'conflict', currentVersion: 2 }
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export type ArtifactSaveResponse = {
|
|
76
|
+
status: 'saved';
|
|
77
|
+
document: ArtifactDocument;
|
|
78
|
+
} | {
|
|
79
|
+
status: 'conflict';
|
|
80
|
+
currentVersion: number;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* 选区改写请求,宿主返回待人工应用的全文提议。
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* import type { ArtifactRewriteRequest } from '@h-ai/ui'
|
|
87
|
+
* const request: ArtifactRewriteRequest = { id: 'report', baseVersion: 1, content: '原文', selectedText: '原文', instruction: '精简' }
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
export interface ArtifactRewriteRequest extends ArtifactSaveRequest {
|
|
91
|
+
selectedText: string;
|
|
92
|
+
instruction: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* 宿主切换页面或退出前调用的异步离开确认。
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* import type { WorkspaceLeaveGuard } from '@h-ai/ui'
|
|
99
|
+
* const canLeave: WorkspaceLeaveGuard = async () => true
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export type WorkspaceLeaveGuard = () => Promise<boolean>;
|
|
103
|
+
/**
|
|
104
|
+
* 通用产物工作台;回调只承接宿主能力,组件不发网络请求或保存业务状态。
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* import type { ArtifactWorkspaceProps } from '@h-ai/ui'
|
|
108
|
+
* const props: ArtifactWorkspaceProps = { artifacts: [], onread: async id => ({ id, title: '报告', kind: 'markdown', version: 1, content: '# 简介' }) }
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
export interface ArtifactWorkspaceProps extends DataAttributes {
|
|
112
|
+
artifacts: readonly ArtifactSummary[];
|
|
113
|
+
selectedId?: string;
|
|
114
|
+
onread: (id: string, version: number | undefined, signal: AbortSignal) => Promise<ArtifactDocument>;
|
|
115
|
+
oncreate?: (request: ArtifactCreateRequest, signal: AbortSignal) => Promise<ArtifactDocument>;
|
|
116
|
+
onsave?: (request: ArtifactSaveRequest, signal: AbortSignal) => Promise<ArtifactSaveResponse>;
|
|
117
|
+
onhistory?: (id: string, signal: AbortSignal) => Promise<readonly ArtifactSummary[]>;
|
|
118
|
+
onrewrite?: (request: ArtifactRewriteRequest, signal: AbortSignal) => Promise<{
|
|
119
|
+
content: string;
|
|
120
|
+
}>;
|
|
121
|
+
onselect?: (id: string) => void;
|
|
122
|
+
onerror?: (error: unknown) => void;
|
|
123
|
+
onleaveguard?: (guard: WorkspaceLeaveGuard | undefined) => void;
|
|
124
|
+
class?: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* 工具参数预设;label 由宿主按自身业务语言提供。
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* import type { ToolExample } from '@h-ai/ui'
|
|
131
|
+
* const example: ToolExample = { label: '相加示例', input: { a: 2, b: 3 } }
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export interface ToolExample {
|
|
135
|
+
label: string;
|
|
136
|
+
input: Record<string, unknown>;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* 当前主体可使用的工具投影;服务端仍需再次校验授权和参数。
|
|
140
|
+
* @example
|
|
141
|
+
* ```ts
|
|
142
|
+
* import type { ToolCatalogItem } from '@h-ai/ui'
|
|
143
|
+
* const tool: ToolCatalogItem = { name: 'sum', description: '计算合计', inputSchema: { type: 'object' } }
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
export interface ToolCatalogItem {
|
|
147
|
+
name: string;
|
|
148
|
+
title?: string;
|
|
149
|
+
description: string;
|
|
150
|
+
inputSchema: Record<string, unknown>;
|
|
151
|
+
examples?: readonly ToolExample[];
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* 单次工具执行的业务展示状态,id 由宿主产生并支持跨节点查询。
|
|
155
|
+
* @example
|
|
156
|
+
* ```ts
|
|
157
|
+
* import type { ToolRun } from '@h-ai/ui'
|
|
158
|
+
* const run: ToolRun = { id: 'job-1', status: 'running', progress: 0.5 }
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
export interface ToolRun {
|
|
162
|
+
id: string;
|
|
163
|
+
/** 仅未知提交恢复时提供,已取得真实回执后省略。 */
|
|
164
|
+
idempotencyKey?: string;
|
|
165
|
+
status: 'queued' | 'running' | 'cancelling' | 'succeeded' | 'failed' | 'cancelled' | 'unknown';
|
|
166
|
+
/** 已完成比例,0..1;不提供时显示不定进度。 */
|
|
167
|
+
progress?: number;
|
|
168
|
+
/** 已经由宿主脱敏且可展示的业务说明。 */
|
|
169
|
+
message?: string;
|
|
170
|
+
result?: unknown;
|
|
171
|
+
artifacts?: readonly ArtifactSummary[];
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* 工具运行请求;可信身份必须由宿主从已认证上下文取得。
|
|
175
|
+
* @example
|
|
176
|
+
* ```ts
|
|
177
|
+
* import type { ToolRunRequest } from '@h-ai/ui'
|
|
178
|
+
* const request: ToolRunRequest = { name: 'sum', input: { a: 2, b: 3 }, idempotencyKey: 'user-action-1' }
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
export interface ToolRunRequest {
|
|
182
|
+
name: string;
|
|
183
|
+
input: Record<string, unknown>;
|
|
184
|
+
idempotencyKey: string;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* 当前主体可选的文件和产物摘要;仅用于表单,服务端仍须复核资源权限。
|
|
188
|
+
* @example
|
|
189
|
+
* ```ts
|
|
190
|
+
* import type { ToolResource } from '@h-ai/ui'
|
|
191
|
+
* const resource: ToolResource = { id: 'image-1', title: '产品图片', mediaType: 'image/png' }
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
export interface ToolResource {
|
|
195
|
+
id: string;
|
|
196
|
+
title: string;
|
|
197
|
+
kind?: string;
|
|
198
|
+
mediaType?: string;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* 通用工具工作台,优先简单表单和预设,复杂参数置于高级入口。
|
|
202
|
+
* @example
|
|
203
|
+
* ```ts
|
|
204
|
+
* import type { ToolWorkspaceProps } from '@h-ai/ui'
|
|
205
|
+
* const props: ToolWorkspaceProps = { tools: [], onrun: async () => ({ id: 'job-1', status: 'succeeded' }) }
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
export interface ToolWorkspaceProps extends DataAttributes {
|
|
209
|
+
tools: readonly ToolCatalogItem[];
|
|
210
|
+
resources?: readonly ToolResource[];
|
|
211
|
+
onrun: (request: ToolRunRequest, signal: AbortSignal) => Promise<ToolRun>;
|
|
212
|
+
initialRun?: ToolRun;
|
|
213
|
+
onrunchange?: (run: ToolRun | undefined) => void;
|
|
214
|
+
onstatus?: (id: string, signal: AbortSignal) => Promise<ToolRun | null>;
|
|
215
|
+
oncancel?: (id: string, signal: AbortSignal) => Promise<ToolRun>;
|
|
216
|
+
onartifact?: (artifact: ArtifactSummary) => void;
|
|
217
|
+
onerror?: (error: unknown) => void;
|
|
218
|
+
/** 查询间隔,默认 1000 毫秒,实际值最低 250 毫秒。 */
|
|
219
|
+
pollIntervalMs?: number;
|
|
220
|
+
class?: string;
|
|
221
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/messages/en-US.json
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
+
"mind_download_title": "Download mind map",
|
|
3
|
+
"mind_export_json": "JSON (.json)",
|
|
4
|
+
"mind_export_csv": "CSV (.csv)",
|
|
5
|
+
"mind_export_xlsx": "Excel (.xlsx)",
|
|
6
|
+
"mind_export_xmind": "XMind (.xmind)",
|
|
7
|
+
"mind_context_ai_rewrite": "AI rewrite",
|
|
8
|
+
"mind_import_json": "Import JSON",
|
|
9
|
+
"mind_load_error": "Mind map could not be loaded.",
|
|
10
|
+
"mind_default_title": "Mind map",
|
|
11
|
+
"mind_layout": "Layout",
|
|
12
|
+
"mind_layout_right": "Right",
|
|
13
|
+
"mind_layout_left": "Left",
|
|
14
|
+
"mind_layout_both": "Both sides",
|
|
15
|
+
"mind_fit": "Fit map",
|
|
16
|
+
"mind_rewrite_selection": "Rewrite selected branch",
|
|
17
|
+
"mind_rewrite_selection_disabled": "Select nodes to rewrite",
|
|
2
18
|
"form_field_error": "{label}: {message}",
|
|
3
19
|
"toast_diagnostics": "View diagnostic details",
|
|
4
20
|
"toast_traceId": "Issue reference ID",
|
|
@@ -577,5 +593,87 @@
|
|
|
577
593
|
"code_explorer": "File explorer",
|
|
578
594
|
"code_readOnly": "Read-only",
|
|
579
595
|
"code_root": "Root folder",
|
|
580
|
-
"code_searchMatch": "{name}, line {line}, column {column}"
|
|
596
|
+
"code_searchMatch": "{name}, line {line}, column {column}",
|
|
597
|
+
"artifact_workspace": "Artifact workspace",
|
|
598
|
+
"artifact_choose": "Choose an artifact",
|
|
599
|
+
"artifact_empty": "Create or select an artifact to view and edit it here.",
|
|
600
|
+
"artifact_version": "Version {version}",
|
|
601
|
+
"artifact_unsaved": "Unsaved changes",
|
|
602
|
+
"artifact_download": "Download",
|
|
603
|
+
"artifact_history": "Version history",
|
|
604
|
+
"artifact_save": "Save version",
|
|
605
|
+
"artifact_saved": "New version saved",
|
|
606
|
+
"artifact_failed": "The artifact operation failed. Keep your draft and retry.",
|
|
607
|
+
"artifact_retry": "Retry loading",
|
|
608
|
+
"artifact_conflict": "The content has changed. Your local draft is preserved.",
|
|
609
|
+
"artifact_conflict_detail": "Version {version} is now current. Copy your draft before loading the latest content.",
|
|
610
|
+
"artifact_copy_draft": "Copy draft",
|
|
611
|
+
"artifact_reload": "Load latest content",
|
|
612
|
+
"artifact_historical": "Viewing a historical version. This content is read-only.",
|
|
613
|
+
"artifact_latest": "Return to latest",
|
|
614
|
+
"artifact_restore_draft": "Use this version as a draft",
|
|
615
|
+
"artifact_preview": "Preview",
|
|
616
|
+
"artifact_source": "Source",
|
|
617
|
+
"artifact_rewrite_instruction": "Select a passage and describe how to rewrite it",
|
|
618
|
+
"artifact_rewrite_improve": "Improve wording",
|
|
619
|
+
"artifact_rewrite_shorten": "Shorten",
|
|
620
|
+
"artifact_proposal": "Rewrite proposal — save after applying",
|
|
621
|
+
"artifact_apply": "Apply proposal",
|
|
622
|
+
"artifact_discard": "Discard changes",
|
|
623
|
+
"artifact_discard_confirm": "Your changes are unsaved. Discard them and open the selected content?",
|
|
624
|
+
"artifact_structure_changed": "This edit changed an unsupported document structure. Copy your edits before reloading; the original Markdown has not been overwritten.",
|
|
625
|
+
"artifact_markdown_hint": "Edit paragraphs and headings directly. Complex blocks keep their original source and can be changed in Source.",
|
|
626
|
+
"artifact_html_hint": "The interactive preview runs in an isolated page with external resources blocked by default.",
|
|
627
|
+
"artifact_download_only": "Download this format to view it, or switch text artifacts to Source.",
|
|
628
|
+
"tool_workspace": "Tool workspace",
|
|
629
|
+
"tool_search": "Find a tool",
|
|
630
|
+
"tool_choose": "Choose a tool",
|
|
631
|
+
"tool_empty": "No matching enabled tools are available.",
|
|
632
|
+
"tool_examples": "Examples",
|
|
633
|
+
"tool_advanced": "Advanced parameters",
|
|
634
|
+
"tool_parameters": "Parameters as JSON",
|
|
635
|
+
"tool_choose_value": "Choose a value",
|
|
636
|
+
"tool_run": "Run tool",
|
|
637
|
+
"tool_cancel": "Cancel task",
|
|
638
|
+
"tool_result": "Execution result",
|
|
639
|
+
"tool_progress": "Execution progress",
|
|
640
|
+
"tool_resume": "Refresh status",
|
|
641
|
+
"tool_failed": "The tool operation failed. Check the input and retry.",
|
|
642
|
+
"tool_invalid_field": "Check this parameter: {field}",
|
|
643
|
+
"tool_invalid_json": "Advanced parameters must be a valid JSON object.",
|
|
644
|
+
"tool_result_unavailable": "This result cannot be displayed directly. Check the artifacts or contact the host.",
|
|
645
|
+
"tool_status_queued": "Queued",
|
|
646
|
+
"tool_status_running": "Running",
|
|
647
|
+
"tool_status_succeeded": "Completed",
|
|
648
|
+
"tool_status_failed": "Failed",
|
|
649
|
+
"tool_status_cancelled": "Cancelled",
|
|
650
|
+
"tool_status_unknown": "Status needs verification",
|
|
651
|
+
"artifact_edit_recovery": "The original Markdown and last valid draft are preserved. Copy the visible edits before reloading.",
|
|
652
|
+
"artifact_copy_visible": "Copy visible edits",
|
|
653
|
+
"tool_status_cancelling": "Cancelling — awaiting stop confirmation",
|
|
654
|
+
"artifact_proposal_stale": "The draft changed. Generate a new proposal to preserve your edits.",
|
|
655
|
+
"artifact_copy_success": "Copied",
|
|
656
|
+
"artifact_copy_failed": "Automatic copying failed. Select and copy the text manually before discarding your draft.",
|
|
657
|
+
"artifact_new": "New artifact",
|
|
658
|
+
"artifact_title": "Artifact title",
|
|
659
|
+
"artifact_kind": "Format",
|
|
660
|
+
"artifact_kind_table": "Table",
|
|
661
|
+
"artifact_kind_chart": "Chart",
|
|
662
|
+
"artifact_create": "Create",
|
|
663
|
+
"artifact_save_first": "Save your changes, or copy the draft and reload, before creating another artifact.",
|
|
664
|
+
"artifact_template_body": "Start editing your content here.",
|
|
665
|
+
"artifact_template_name": "Name",
|
|
666
|
+
"artifact_template_value": "Value",
|
|
667
|
+
"artifact_template_click": "Count clicks",
|
|
668
|
+
"tool_resource_choose": "Search files or artifacts by name",
|
|
669
|
+
"tool_resource_manual": "Enter resource IDs manually",
|
|
670
|
+
"tool_resource_manual_hint": "If a resource is missing, enter an authorized ID. Use one ID per line for multiple resources. The server still checks access.",
|
|
671
|
+
"tool_resource_manual_field": "{field}: manual resource IDs",
|
|
672
|
+
"tool_submission_unknown": "Submission is unconfirmed. Refresh status to recover it; retries reuse the same request key.",
|
|
673
|
+
"tool_submission_not_found": "No accepted request was found yet. Retry with the same key; this does not mean the original request was cancelled.",
|
|
674
|
+
"tool_retry_submission": "Retry the same request",
|
|
675
|
+
"artifact_rewrite_selection": "Rewrite source selection",
|
|
676
|
+
"artifact_rewrite_source_hint": "This visual selection cannot be mapped precisely to Markdown. Switch to Source, select the exact fragment and rewrite it.",
|
|
677
|
+
"tool_new_operation": "Start another operation",
|
|
678
|
+
"tool_new_operation_confirm": "The previous task may still be running. A new operation uses a new request key, runs separately and may incur separate charges. Continue?"
|
|
581
679
|
}
|
package/dist/messages/ja-JP.json
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
+
"mind_download_title": "マインドマップをダウンロード",
|
|
3
|
+
"mind_export_json": "JSON (.json)",
|
|
4
|
+
"mind_export_csv": "CSV (.csv)",
|
|
5
|
+
"mind_export_xlsx": "Excel (.xlsx)",
|
|
6
|
+
"mind_export_xmind": "XMind (.xmind)",
|
|
7
|
+
"mind_context_ai_rewrite": "AI 書き換え",
|
|
8
|
+
"mind_import_json": "JSON をインポート",
|
|
9
|
+
"mind_load_error": "マインドマップを読み込めませんでした。",
|
|
10
|
+
"mind_default_title": "マインドマップ",
|
|
11
|
+
"mind_layout": "レイアウト",
|
|
12
|
+
"mind_layout_right": "右向き",
|
|
13
|
+
"mind_layout_left": "左向き",
|
|
14
|
+
"mind_layout_both": "両側",
|
|
15
|
+
"mind_fit": "全体を表示",
|
|
16
|
+
"mind_rewrite_selection": "選択した分岐を書き換える",
|
|
17
|
+
"mind_rewrite_selection_disabled": "ノードを選択して書き換え",
|
|
2
18
|
"form_field_error": "{label}:{message}",
|
|
3
19
|
"toast_diagnostics": "調査情報を表示",
|
|
4
20
|
"toast_traceId": "問題の追跡番号",
|
|
@@ -577,5 +593,87 @@
|
|
|
577
593
|
"code_explorer": "ファイルエクスプローラー",
|
|
578
594
|
"code_readOnly": "読み取り専用",
|
|
579
595
|
"code_root": "ルートフォルダー",
|
|
580
|
-
"code_searchMatch": "{name}、{line} 行 {column} 列"
|
|
596
|
+
"code_searchMatch": "{name}、{line} 行 {column} 列",
|
|
597
|
+
"artifact_workspace": "成果物ワークスペース",
|
|
598
|
+
"artifact_choose": "成果物を選択",
|
|
599
|
+
"artifact_empty": "成果物を作成または選択すると、ここで表示・編集できます。",
|
|
600
|
+
"artifact_version": "バージョン {version}",
|
|
601
|
+
"artifact_unsaved": "未保存の変更があります",
|
|
602
|
+
"artifact_download": "ダウンロード",
|
|
603
|
+
"artifact_history": "バージョン履歴",
|
|
604
|
+
"artifact_save": "バージョンを保存",
|
|
605
|
+
"artifact_saved": "新しいバージョンを保存しました",
|
|
606
|
+
"artifact_failed": "成果物の操作に失敗しました。下書きを保持して再試行してください。",
|
|
607
|
+
"artifact_retry": "再読み込み",
|
|
608
|
+
"artifact_conflict": "内容が更新されています。ローカルの下書きは保持されています。",
|
|
609
|
+
"artifact_conflict_detail": "現在のバージョンは {version} です。最新の内容を読み込む前に下書きをコピーしてください。",
|
|
610
|
+
"artifact_copy_draft": "下書きをコピー",
|
|
611
|
+
"artifact_reload": "最新の内容を読み込む",
|
|
612
|
+
"artifact_historical": "過去のバージョンを表示しています。内容は読み取り専用です。",
|
|
613
|
+
"artifact_latest": "最新に戻る",
|
|
614
|
+
"artifact_restore_draft": "このバージョンを下書きにする",
|
|
615
|
+
"artifact_preview": "プレビュー",
|
|
616
|
+
"artifact_source": "ソース",
|
|
617
|
+
"artifact_rewrite_instruction": "文章を選択し、書き換え方を入力",
|
|
618
|
+
"artifact_rewrite_improve": "表現を改善",
|
|
619
|
+
"artifact_rewrite_shorten": "短くする",
|
|
620
|
+
"artifact_proposal": "書き換えの提案(適用後に保存が必要です)",
|
|
621
|
+
"artifact_apply": "提案を適用",
|
|
622
|
+
"artifact_discard": "変更を破棄",
|
|
623
|
+
"artifact_discard_confirm": "変更は未保存です。破棄して選択した内容を開きますか?",
|
|
624
|
+
"artifact_structure_changed": "未対応の文書構造が変更されました。編集内容をコピーしてから再読み込みしてください。元の Markdown は上書きされていません。",
|
|
625
|
+
"artifact_markdown_hint": "段落と見出しを直接編集できます。複雑なブロックは元のソースを保持し、ソース表示で変更できます。",
|
|
626
|
+
"artifact_html_hint": "対話型プレビューは隔離したページで実行され、外部リソースは既定でブロックされます。",
|
|
627
|
+
"artifact_download_only": "この形式はダウンロードして確認できます。テキスト成果物はソース表示に切り替えられます。",
|
|
628
|
+
"tool_workspace": "ツールワークスペース",
|
|
629
|
+
"tool_search": "ツールを検索",
|
|
630
|
+
"tool_choose": "ツールを選択",
|
|
631
|
+
"tool_empty": "一致する有効なツールがありません。",
|
|
632
|
+
"tool_examples": "操作例",
|
|
633
|
+
"tool_advanced": "詳細パラメーター",
|
|
634
|
+
"tool_parameters": "パラメーター JSON",
|
|
635
|
+
"tool_choose_value": "選択してください",
|
|
636
|
+
"tool_run": "ツールを実行",
|
|
637
|
+
"tool_cancel": "タスクをキャンセル",
|
|
638
|
+
"tool_result": "実行結果",
|
|
639
|
+
"tool_progress": "実行状況",
|
|
640
|
+
"tool_resume": "状態を再取得",
|
|
641
|
+
"tool_failed": "ツールの操作に失敗しました。入力を確認して再試行してください。",
|
|
642
|
+
"tool_invalid_field": "パラメーターを確認してください:{field}",
|
|
643
|
+
"tool_invalid_json": "詳細パラメーターには有効な JSON オブジェクトを入力してください。",
|
|
644
|
+
"tool_result_unavailable": "結果を直接表示できません。成果物を確認するか、ホストにお問い合わせください。",
|
|
645
|
+
"tool_status_queued": "待機中",
|
|
646
|
+
"tool_status_running": "実行中",
|
|
647
|
+
"tool_status_succeeded": "完了",
|
|
648
|
+
"tool_status_failed": "失敗",
|
|
649
|
+
"tool_status_cancelled": "キャンセル済み",
|
|
650
|
+
"tool_status_unknown": "状態の確認が必要です",
|
|
651
|
+
"artifact_edit_recovery": "元の Markdown と最後の保存可能な下書きは保持されています。表示中の編集内容をコピーしてから再読み込みしてください。",
|
|
652
|
+
"artifact_copy_visible": "表示中の編集内容をコピー",
|
|
653
|
+
"tool_status_cancelling": "キャンセル中(停止確認を待機)",
|
|
654
|
+
"artifact_proposal_stale": "下書きが変更されました。編集を保持するため提案を再生成してください。",
|
|
655
|
+
"artifact_copy_success": "コピーしました",
|
|
656
|
+
"artifact_copy_failed": "自動コピーできませんでした。文字を選択して手動でコピーし、保存できたことを確認してから下書きを破棄してください。",
|
|
657
|
+
"artifact_new": "成果物を新規作成",
|
|
658
|
+
"artifact_title": "成果物の名前",
|
|
659
|
+
"artifact_kind": "形式",
|
|
660
|
+
"artifact_kind_table": "テーブル",
|
|
661
|
+
"artifact_kind_chart": "グラフ",
|
|
662
|
+
"artifact_create": "作成",
|
|
663
|
+
"artifact_save_first": "別の成果物を作る前に変更を保存するか、下書きをコピーして再読み込みしてください。",
|
|
664
|
+
"artifact_template_body": "ここから内容を編集してください。",
|
|
665
|
+
"artifact_template_name": "名前",
|
|
666
|
+
"artifact_template_value": "値",
|
|
667
|
+
"artifact_template_click": "クリックを数える",
|
|
668
|
+
"tool_resource_choose": "名前でファイルや成果物を検索",
|
|
669
|
+
"tool_resource_manual": "リソース ID を手動で入力",
|
|
670
|
+
"tool_resource_manual_hint": "見つからない場合は権限のある ID を入力できます。複数の場合は 1 行に 1 つ入力します。サーバーで権限を再確認します。",
|
|
671
|
+
"tool_resource_manual_field": "{field}:手動リソース ID",
|
|
672
|
+
"tool_submission_unknown": "受付結果は未確認です。状態更新で取得でき、再試行も同じ要求キーを使います。",
|
|
673
|
+
"tool_submission_not_found": "受付記録はまだ見つかりません。同じキーで再試行できますが、元の要求の取消を意味しません。",
|
|
674
|
+
"tool_retry_submission": "同じ要求で再試行",
|
|
675
|
+
"artifact_rewrite_selection": "ソース選択範囲を書き換え",
|
|
676
|
+
"artifact_rewrite_source_hint": "この表示上の選択は Markdown に正確に対応できません。ソースで該当箇所を選び直して書き換えてください。",
|
|
677
|
+
"tool_new_operation": "別の操作を開始",
|
|
678
|
+
"tool_new_operation_confirm": "前のタスクは実行中の可能性があります。新しい操作は別の要求キーで独立して実行され、別途料金が発生する場合があります。続行しますか?"
|
|
581
679
|
}
|
package/dist/messages/zh-CN.json
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
+
"mind_download_title": "下载脑图",
|
|
3
|
+
"mind_export_json": "JSON (.json)",
|
|
4
|
+
"mind_export_csv": "CSV (.csv)",
|
|
5
|
+
"mind_export_xlsx": "Excel (.xlsx)",
|
|
6
|
+
"mind_export_xmind": "XMind (.xmind)",
|
|
7
|
+
"mind_context_ai_rewrite": "AI 改写",
|
|
8
|
+
"mind_import_json": "导入 JSON",
|
|
9
|
+
"mind_load_error": "脑图加载失败。",
|
|
10
|
+
"mind_default_title": "脑图",
|
|
11
|
+
"mind_layout": "布局",
|
|
12
|
+
"mind_layout_right": "向右",
|
|
13
|
+
"mind_layout_left": "向左",
|
|
14
|
+
"mind_layout_both": "双向",
|
|
15
|
+
"mind_fit": "适应画布",
|
|
16
|
+
"mind_rewrite_selection": "改写选中分支",
|
|
17
|
+
"mind_rewrite_selection_disabled": "选择节点后改写",
|
|
2
18
|
"form_field_error": "{label}:{message}",
|
|
3
19
|
"toast_diagnostics": "查看排查信息",
|
|
4
20
|
"toast_traceId": "问题追踪编号",
|
|
@@ -577,5 +593,87 @@
|
|
|
577
593
|
"code_explorer": "资源管理器",
|
|
578
594
|
"code_readOnly": "只读",
|
|
579
595
|
"code_root": "根目录",
|
|
580
|
-
"code_searchMatch": "{name} 第 {line} 行第 {column} 列"
|
|
596
|
+
"code_searchMatch": "{name} 第 {line} 行第 {column} 列",
|
|
597
|
+
"artifact_workspace": "产物工作台",
|
|
598
|
+
"artifact_choose": "选择产物",
|
|
599
|
+
"artifact_empty": "生成或选择产物后,可在这里查看和编辑。",
|
|
600
|
+
"artifact_version": "版本 {version}",
|
|
601
|
+
"artifact_unsaved": "有未保存的修改",
|
|
602
|
+
"artifact_download": "下载",
|
|
603
|
+
"artifact_history": "版本历史",
|
|
604
|
+
"artifact_save": "保存版本",
|
|
605
|
+
"artifact_saved": "新版本已保存",
|
|
606
|
+
"artifact_failed": "产物操作失败,请保留草稿后重试。",
|
|
607
|
+
"artifact_retry": "重新读取",
|
|
608
|
+
"artifact_conflict": "内容已被更新,本地草稿仍保留。",
|
|
609
|
+
"artifact_conflict_detail": "当前已是版本 {version}。请先复制草稿,再读取最新内容。",
|
|
610
|
+
"artifact_copy_draft": "复制草稿",
|
|
611
|
+
"artifact_reload": "读取最新内容",
|
|
612
|
+
"artifact_historical": "正在查看历史版本,内容为只读。",
|
|
613
|
+
"artifact_latest": "返回最新版本",
|
|
614
|
+
"artifact_restore_draft": "以此版本创建草稿",
|
|
615
|
+
"artifact_preview": "预览",
|
|
616
|
+
"artifact_source": "源码",
|
|
617
|
+
"artifact_rewrite_instruction": "选中段落后,告诉 AI 如何改写",
|
|
618
|
+
"artifact_rewrite_improve": "润色",
|
|
619
|
+
"artifact_rewrite_shorten": "精简",
|
|
620
|
+
"artifact_proposal": "改写建议,应用后仍需保存",
|
|
621
|
+
"artifact_apply": "应用建议",
|
|
622
|
+
"artifact_discard": "放弃修改",
|
|
623
|
+
"artifact_discard_confirm": "当前修改尚未保存。放弃后再打开所选内容?",
|
|
624
|
+
"artifact_structure_changed": "此次编辑改变了不支持的文档结构。请先复制编辑内容,再重新读取;原始 Markdown 尚未覆盖。",
|
|
625
|
+
"artifact_markdown_hint": "可直接编辑普通段落和标题。复杂块保留原文,可在源码中修改。",
|
|
626
|
+
"artifact_html_hint": "交互预览在隔离页面中运行,默认不加载外部资源。",
|
|
627
|
+
"artifact_download_only": "当前格式可下载查看;文本产物可切换源码。",
|
|
628
|
+
"tool_workspace": "工具工作台",
|
|
629
|
+
"tool_search": "查找工具",
|
|
630
|
+
"tool_choose": "选择工具",
|
|
631
|
+
"tool_empty": "当前没有匹配且已启用的工具。",
|
|
632
|
+
"tool_examples": "操作示例",
|
|
633
|
+
"tool_advanced": "高级参数",
|
|
634
|
+
"tool_parameters": "参数 JSON",
|
|
635
|
+
"tool_choose_value": "请选择",
|
|
636
|
+
"tool_run": "运行工具",
|
|
637
|
+
"tool_cancel": "取消任务",
|
|
638
|
+
"tool_result": "执行结果",
|
|
639
|
+
"tool_progress": "执行进度",
|
|
640
|
+
"tool_resume": "重新查询状态",
|
|
641
|
+
"tool_failed": "工具操作失败,请检查后重试。",
|
|
642
|
+
"tool_invalid_field": "请检查参数:{field}",
|
|
643
|
+
"tool_invalid_json": "高级参数需要有效的 JSON 对象。",
|
|
644
|
+
"tool_result_unavailable": "结果无法直接显示,请查看产物或联系宿主。",
|
|
645
|
+
"tool_status_queued": "排队中",
|
|
646
|
+
"tool_status_running": "执行中",
|
|
647
|
+
"tool_status_succeeded": "已完成",
|
|
648
|
+
"tool_status_failed": "执行失败",
|
|
649
|
+
"tool_status_cancelled": "已取消",
|
|
650
|
+
"tool_status_unknown": "状态待核验",
|
|
651
|
+
"artifact_edit_recovery": "原始 Markdown 和上次可保存草稿仍保留。可先复制当前显示的编辑内容,再重新读取。",
|
|
652
|
+
"artifact_copy_visible": "复制当前编辑文字",
|
|
653
|
+
"tool_status_cancelling": "正在取消,等待停止确认",
|
|
654
|
+
"artifact_proposal_stale": "草稿已修改,请重新生成提议以保留新内容",
|
|
655
|
+
"artifact_copy_success": "已复制",
|
|
656
|
+
"artifact_copy_failed": "无法自动复制。请手动选中文字复制,确认保留后再放弃草稿。",
|
|
657
|
+
"artifact_new": "新建产物",
|
|
658
|
+
"artifact_title": "产物名称",
|
|
659
|
+
"artifact_kind": "格式",
|
|
660
|
+
"artifact_kind_table": "表格",
|
|
661
|
+
"artifact_kind_chart": "图表",
|
|
662
|
+
"artifact_create": "创建",
|
|
663
|
+
"artifact_save_first": "请先保存当前修改,或复制草稿后重新读取,再新建产物。",
|
|
664
|
+
"artifact_template_body": "在这里开始编辑内容。",
|
|
665
|
+
"artifact_template_name": "名称",
|
|
666
|
+
"artifact_template_value": "数值",
|
|
667
|
+
"artifact_template_click": "点击计数",
|
|
668
|
+
"tool_resource_choose": "按名称搜索文件或产物",
|
|
669
|
+
"tool_resource_manual": "手动填写资源 ID",
|
|
670
|
+
"tool_resource_manual_hint": "找不到资源时可填写已授权的 ID;多个 ID 每行一个。服务端仍会验证权限。",
|
|
671
|
+
"tool_resource_manual_field": "{field}:手动资源 ID",
|
|
672
|
+
"tool_submission_unknown": "提交结果尚未确认。可刷新状态找回任务,重试会复用同一个请求编号。",
|
|
673
|
+
"tool_submission_not_found": "暂未找到受理记录。可用同一请求编号重试;这不表示原请求已取消。",
|
|
674
|
+
"tool_retry_submission": "用同一编号重试",
|
|
675
|
+
"artifact_rewrite_selection": "改写源码选区",
|
|
676
|
+
"artifact_rewrite_source_hint": "此可视选区无法精确对应 Markdown。请切换源码,重新选择片段后改写。",
|
|
677
|
+
"tool_new_operation": "开始另一操作",
|
|
678
|
+
"tool_new_operation_confirm": "旧任务可能仍在后台运行。新操作会使用新的请求编号独立执行,并可能另行计费。是否继续?"
|
|
581
679
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-ai/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.31",
|
|
5
5
|
"description": "Hai Framework UI component library for Svelte 5 Runes.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"svelte": "./dist/index.js",
|
|
@@ -108,6 +108,11 @@
|
|
|
108
108
|
"svelte": "./dist/components/scenes/storage/index.js",
|
|
109
109
|
"import": "./dist/components/scenes/storage/index.js"
|
|
110
110
|
},
|
|
111
|
+
"./components/scenes/tools/index": {
|
|
112
|
+
"types": "./dist/components/scenes/tools/index.d.ts",
|
|
113
|
+
"svelte": "./dist/components/scenes/tools/index.js",
|
|
114
|
+
"import": "./dist/components/scenes/tools/index.js"
|
|
115
|
+
},
|
|
111
116
|
"./styles/*": "./dist/styles/*"
|
|
112
117
|
},
|
|
113
118
|
"main": "./dist/index.js",
|
|
@@ -129,7 +134,7 @@
|
|
|
129
134
|
"svelte": "^5.57.3"
|
|
130
135
|
},
|
|
131
136
|
"dependencies": {
|
|
132
|
-
"@h-ai/core": "1.0.0-beta.
|
|
137
|
+
"@h-ai/core": "1.0.0-beta.31",
|
|
133
138
|
"@internationalized/date": "^3.12.4",
|
|
134
139
|
"@rrweb/replay": "^2.2.1",
|
|
135
140
|
"@shikijs/langs": "^4.6.0",
|
|
@@ -141,6 +146,7 @@
|
|
|
141
146
|
"layerchart": "2.9.2",
|
|
142
147
|
"marked": "^18.1.3",
|
|
143
148
|
"mermaid": "^12.3.0",
|
|
149
|
+
"mind-elixir": "6.0.1",
|
|
144
150
|
"monaco-editor": "0.57.0",
|
|
145
151
|
"shiki": "^4.6.0",
|
|
146
152
|
"tailwind-merge": "^3.7.0"
|