@dsh-workbench/shared 0.2.0 → 0.2.2
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/dist/api/unit.d.ts +1 -0
- package/dist/api/unit.js +3 -1
- package/dist/components/CardBoundary.d.ts +1 -0
- package/dist/components/CardBoundary.js +3 -1
- package/dist/config/constants.d.ts +4 -0
- package/dist/config/constants.js +7 -0
- package/dist/host/http.d.ts +2 -0
- package/dist/host/http.js +31 -1
- package/dist/host/tool-approval.d.ts +5 -0
- package/dist/host/tool-approval.js +47 -9
- package/dist/host/unit-face.d.ts +1 -0
- package/dist/host.d.ts +1 -0
- package/dist/host.js +1 -0
- package/dist/i18n/en.js +21 -13
- package/dist/i18n/index.d.ts +22 -14
- package/dist/i18n/zh.d.ts +21 -13
- package/dist/i18n/zh.js +21 -13
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/panel-state.d.ts +60 -0
- package/dist/lib/panel-state.js +146 -0
- package/package.json +1 -1
- package/src/api/__tests__/unit.test.ts +38 -0
- package/src/api/unit.ts +4 -0
- package/src/components/CardBoundary.tsx +4 -1
- package/src/config/constants.ts +11 -0
- package/src/host/http.ts +30 -1
- package/src/host/tool-approval.ts +54 -8
- package/src/host/unit-face.ts +1 -0
- package/src/host.ts +1 -0
- package/src/i18n/en.ts +21 -13
- package/src/i18n/zh.ts +21 -13
- package/src/index.ts +1 -0
- package/src/lib/panel-state.test.ts +123 -0
- package/src/lib/panel-state.ts +209 -0
package/dist/api/unit.d.ts
CHANGED
package/dist/api/unit.js
CHANGED
|
@@ -12,7 +12,9 @@ export class CardBoundary extends Component {
|
|
|
12
12
|
return { reason: errorReasonOf(error) };
|
|
13
13
|
}
|
|
14
14
|
componentDidCatch(error) {
|
|
15
|
-
|
|
15
|
+
const reason = errorReasonOf(error);
|
|
16
|
+
console.error(`[dsh-workbench] 模块 ${this.props.unit} 渲染失败:${reason}`, error);
|
|
17
|
+
this.props.onFailure?.(reason);
|
|
16
18
|
}
|
|
17
19
|
componentDidUpdate(previous) {
|
|
18
20
|
if (previous.resetKey !== this.props.resetKey && this.state.reason !== null) {
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
export declare const PLUGIN_ID = "@dsh-workbench/core";
|
|
2
|
+
export declare const RELEASE_SIBLINGS: readonly ["@dsh-workbench/shared", "@dsh-workbench/module-tools"];
|
|
2
3
|
export declare const API_PREFIX = "/workbench/api";
|
|
3
4
|
export declare const PREFS_PREFIX = "/workbench/api/prefs";
|
|
4
5
|
export declare const EVENTS_PATH = "/workbench/events";
|
|
5
6
|
export declare const ACTIONS_PREFIX = "/workbench/api/actions";
|
|
6
7
|
export declare const PROVISION_PREFIX = "/workbench/api/provision";
|
|
8
|
+
export declare const PANEL_STATE_PATH = "panel-state";
|
|
9
|
+
export declare const PANEL_STATE_PREFIX = "/workbench/api/panel-state";
|
|
7
10
|
export declare const OPENCLI_PIN = "1.8.8";
|
|
8
11
|
export declare const CODING_ISSUES_SERVICE = "workbenchCodingIssues";
|
|
9
12
|
export declare const PANELS_SERVICE = "workbenchPanels";
|
|
10
13
|
export declare const UNITS_SERVICE = "workbenchUnits";
|
|
14
|
+
export declare const PANEL_STATE_SERVICE = "workbenchPanelState";
|
|
11
15
|
export declare const PANEL_LIST_LIMIT = 50;
|
|
12
16
|
export declare const OPENCLI_TIMEOUT_MS = 120000;
|
|
13
17
|
export declare const OPENCLI_MAX_CONCURRENT = 4;
|
package/dist/config/constants.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
export const PLUGIN_ID = "@dsh-workbench/core";
|
|
2
|
+
export const RELEASE_SIBLINGS = [
|
|
3
|
+
"@dsh-workbench/shared",
|
|
4
|
+
"@dsh-workbench/module-tools",
|
|
5
|
+
];
|
|
2
6
|
export const API_PREFIX = "/workbench/api";
|
|
3
7
|
export const PREFS_PREFIX = `${API_PREFIX}/prefs`;
|
|
4
8
|
export const EVENTS_PATH = "/workbench/events";
|
|
5
9
|
export const ACTIONS_PREFIX = `${API_PREFIX}/actions`;
|
|
6
10
|
export const PROVISION_PREFIX = `${API_PREFIX}/provision`;
|
|
11
|
+
export const PANEL_STATE_PATH = "panel-state";
|
|
12
|
+
export const PANEL_STATE_PREFIX = `${API_PREFIX}/${PANEL_STATE_PATH}`;
|
|
7
13
|
export const OPENCLI_PIN = "1.8.8";
|
|
8
14
|
export const CODING_ISSUES_SERVICE = "workbenchCodingIssues";
|
|
9
15
|
export const PANELS_SERVICE = "workbenchPanels";
|
|
10
16
|
export const UNITS_SERVICE = "workbenchUnits";
|
|
17
|
+
export const PANEL_STATE_SERVICE = "workbenchPanelState";
|
|
11
18
|
export const PANEL_LIST_LIMIT = 50;
|
|
12
19
|
export const OPENCLI_TIMEOUT_MS = 120_000;
|
|
13
20
|
export const OPENCLI_MAX_CONCURRENT = 4;
|
package/dist/host/http.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DshHostContext } from '../api/dsh.js';
|
|
2
|
+
import { type PanelStateStore } from '../lib/panel-state.js';
|
|
2
3
|
import { type ProvisionHandler } from './provision.js';
|
|
3
4
|
export type RouteHandler = (search: URLSearchParams) => Promise<unknown> | unknown;
|
|
4
5
|
export type RouteTable = Record<string, RouteHandler>;
|
|
@@ -39,3 +40,4 @@ export interface OpencliHealth {
|
|
|
39
40
|
export declare function healthHandler(ctx: DshHostContext, opencli?: OpencliHealth): RouteHandler;
|
|
40
41
|
export declare function registerPrefs(ctx: DshHostContext, resources: readonly PostResource[], wrote?: ((resource: string, write: PostWrite) => void) | undefined): () => void;
|
|
41
42
|
export declare function registerActions(ctx: DshHostContext, resources: readonly PostResource[], wrote?: ((resource: string, write: PostWrite) => void) | undefined): () => void;
|
|
43
|
+
export declare function registerPanelState(ctx: DshHostContext, store: PanelStateStore): () => void;
|
package/dist/host/http.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { unitFactScope } from '../api/facts.js';
|
|
2
|
-
import {
|
|
2
|
+
import { parseCardsReport, parseCrashReport } from '../lib/panel-state.js';
|
|
3
|
+
import { ACTIONS_PREFIX, API_PREFIX, PANEL_STATE_PREFIX, PLUGIN_ID, PREFS_PREFIX, PROVISION_PREFIX } from '../config/constants.js';
|
|
3
4
|
import { parseProvisionBody, } from './provision.js';
|
|
4
5
|
import { WorkbenchDataError } from '../host/opencli.js';
|
|
5
6
|
import { writeResultForClient } from './write-result.js';
|
|
@@ -225,3 +226,32 @@ export function registerActions(ctx, resources, wrote) {
|
|
|
225
226
|
...(wrote === undefined ? {} : { wrote }),
|
|
226
227
|
});
|
|
227
228
|
}
|
|
229
|
+
export function registerPanelState(ctx, store) {
|
|
230
|
+
return registerPost(ctx, {
|
|
231
|
+
prefix: PANEL_STATE_PREFIX,
|
|
232
|
+
what: '面板运行态',
|
|
233
|
+
refusedCode: 'report-refused',
|
|
234
|
+
resources: [
|
|
235
|
+
{
|
|
236
|
+
resource: 'cards',
|
|
237
|
+
handle(payload) {
|
|
238
|
+
const parsed = parseCardsReport(payload);
|
|
239
|
+
if (!parsed.ok)
|
|
240
|
+
return { ok: false, text: parsed.message };
|
|
241
|
+
store.cards(parsed.value);
|
|
242
|
+
return { ok: true, at: Date.now() };
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
resource: 'crash',
|
|
247
|
+
handle(payload) {
|
|
248
|
+
const parsed = parseCrashReport(payload);
|
|
249
|
+
if (!parsed.ok)
|
|
250
|
+
return { ok: false, text: parsed.message };
|
|
251
|
+
store.crash(parsed.value);
|
|
252
|
+
return { ok: true, at: Date.now() };
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
});
|
|
257
|
+
}
|
|
@@ -16,6 +16,11 @@ export interface ApprovalDetail {
|
|
|
16
16
|
export type ApprovalFacts = ApprovalDetail | {
|
|
17
17
|
readonly blocked: string;
|
|
18
18
|
};
|
|
19
|
+
export declare const APPROVAL_NOTE_ARG = "approval_note";
|
|
20
|
+
export declare const APPROVAL_NOTE_LIMIT = 160;
|
|
21
|
+
export declare function withApprovalNote(parameters: Record<string, unknown>, options?: {
|
|
22
|
+
readonly required?: boolean | undefined;
|
|
23
|
+
}): Record<string, unknown>;
|
|
19
24
|
export interface ApprovalCall {
|
|
20
25
|
readonly name?: string | undefined;
|
|
21
26
|
readonly arguments?: unknown;
|
|
@@ -1,14 +1,48 @@
|
|
|
1
|
+
export const APPROVAL_NOTE_ARG = 'approval_note';
|
|
2
|
+
export const APPROVAL_NOTE_LIMIT = 160;
|
|
3
|
+
const NOTE_SCHEMA = {
|
|
4
|
+
type: 'string',
|
|
5
|
+
description: '一句话说明你这次想拿它干什么(要点头的那几通会显示在审批屏上)。',
|
|
6
|
+
};
|
|
7
|
+
export function withApprovalNote(parameters, options = {}) {
|
|
8
|
+
const properties = parameters['properties'];
|
|
9
|
+
if (typeof properties !== 'object' || properties === null)
|
|
10
|
+
return parameters;
|
|
11
|
+
const map = properties;
|
|
12
|
+
if (APPROVAL_NOTE_ARG in map)
|
|
13
|
+
return parameters;
|
|
14
|
+
const declared = Array.isArray(parameters['required']) ? parameters['required'] : [];
|
|
15
|
+
const kept = declared.filter((name) => name !== APPROVAL_NOTE_ARG);
|
|
16
|
+
const required = options.required === true ? [...kept, APPROVAL_NOTE_ARG] : kept;
|
|
17
|
+
return {
|
|
18
|
+
...parameters,
|
|
19
|
+
properties: { ...map, [APPROVAL_NOTE_ARG]: NOTE_SCHEMA },
|
|
20
|
+
...(required.length === 0 ? {} : { required }),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function approvalNoteOf(call) {
|
|
24
|
+
const raw = call.arguments;
|
|
25
|
+
const value = typeof raw === 'object' && raw !== null ? raw[APPROVAL_NOTE_ARG] : undefined;
|
|
26
|
+
if (typeof value !== 'string')
|
|
27
|
+
return undefined;
|
|
28
|
+
const line = value.replace(/\s+/g, ' ').trim();
|
|
29
|
+
if (line === '')
|
|
30
|
+
return undefined;
|
|
31
|
+
return line.length > APPROVAL_NOTE_LIMIT ? `${line.slice(0, APPROVAL_NOTE_LIMIT)}…` : line;
|
|
32
|
+
}
|
|
1
33
|
function messageOf(error) {
|
|
2
34
|
return error instanceof Error ? error.message : String(error);
|
|
3
35
|
}
|
|
4
|
-
function compose(detail, verdict) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
36
|
+
function compose(detail, verdict, note) {
|
|
37
|
+
const base = detail === undefined || typeof detail.zh !== 'string' || detail.zh.trim() === ''
|
|
38
|
+
? verdict.fallback
|
|
39
|
+
: {
|
|
40
|
+
en: `${detail.en} — ${verdict.question.en}`,
|
|
41
|
+
zh: `${detail.zh} —— ${verdict.question.zh}`,
|
|
42
|
+
};
|
|
43
|
+
if (note === undefined)
|
|
44
|
+
return base;
|
|
45
|
+
return { en: `${base.en} — ${note}`, zh: `${base.zh} —— ${note}` };
|
|
12
46
|
}
|
|
13
47
|
export async function approvalFor(call, context = {}) {
|
|
14
48
|
if (context.writes !== true)
|
|
@@ -41,5 +75,9 @@ export async function approvalFor(call, context = {}) {
|
|
|
41
75
|
}
|
|
42
76
|
if (facts !== undefined && 'blocked' in facts)
|
|
43
77
|
return { kind: 'deny', reason: facts.blocked };
|
|
44
|
-
return {
|
|
78
|
+
return {
|
|
79
|
+
kind: 'ask',
|
|
80
|
+
reason: verdict.reason,
|
|
81
|
+
displayReason: compose(facts, verdict, approvalNoteOf(call)),
|
|
82
|
+
};
|
|
45
83
|
}
|
package/dist/host/unit-face.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export interface UnitMountDeps {
|
|
|
16
16
|
} | undefined;
|
|
17
17
|
readonly manifests: () => readonly UnitManifest[];
|
|
18
18
|
readonly ownedUnits: () => readonly string[];
|
|
19
|
+
readonly installable?: (() => readonly string[]) | undefined;
|
|
19
20
|
readonly opencliCommand?: string;
|
|
20
21
|
readonly store: WorkspaceStore;
|
|
21
22
|
readonly values?: ValueHandoff | undefined;
|
package/dist/host.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './api/facts.js';
|
|
|
6
6
|
export * from './api/long-task.js';
|
|
7
7
|
export * from './lib/text.js';
|
|
8
8
|
export * from './lib/ui.js';
|
|
9
|
+
export * from './lib/panel-state.js';
|
|
9
10
|
export * from './api/blocker-table.js';
|
|
10
11
|
export * from './host/cli-error.js';
|
|
11
12
|
export * from './host/data-root.js';
|
package/dist/host.js
CHANGED
|
@@ -6,6 +6,7 @@ export * from './api/facts.js';
|
|
|
6
6
|
export * from './api/long-task.js';
|
|
7
7
|
export * from './lib/text.js';
|
|
8
8
|
export * from './lib/ui.js';
|
|
9
|
+
export * from './lib/panel-state.js';
|
|
9
10
|
export * from './api/blocker-table.js';
|
|
10
11
|
export * from './host/cli-error.js';
|
|
11
12
|
export * from './host/data-root.js';
|
package/dist/i18n/en.js
CHANGED
|
@@ -7,6 +7,8 @@ export const en = {
|
|
|
7
7
|
'project.none': 'No project',
|
|
8
8
|
'project.empty': 'No projects yet. Use “Add project” below.',
|
|
9
9
|
'project.add': 'Add project…',
|
|
10
|
+
'project.add.busy': 'Creating the workspace…',
|
|
11
|
+
'project.add.failed': 'Creating the workspace failed',
|
|
10
12
|
'project.search.label': 'Search workspaces',
|
|
11
13
|
'project.search.placeholder': 'Search workspaces (folder / name / path)',
|
|
12
14
|
'project.search.empty': 'No workspace matches “{query}”.',
|
|
@@ -40,18 +42,22 @@ export const en = {
|
|
|
40
42
|
'time.hours': '{n} h ago',
|
|
41
43
|
'time.days': '{n} d ago',
|
|
42
44
|
'panels.title': 'Panel modules',
|
|
43
|
-
'panels.
|
|
44
|
-
'panels.
|
|
45
|
-
'panels.market.
|
|
46
|
-
'panels.
|
|
47
|
-
'panels.
|
|
45
|
+
'panels.groupBoardless': 'No-board modules',
|
|
46
|
+
'panels.groupPlugins': 'opencli plugins',
|
|
47
|
+
'panels.market.defaultHint': 'When on, it is on by default in every workspace; you can also turn it off for a single workspace in Panel setup.',
|
|
48
|
+
'panels.market.defaultLabel': 'On by default everywhere',
|
|
49
|
+
'panels.market.defaultLocked': 'Unusable right now — update or uninstall it first',
|
|
48
50
|
'panels.followAll': 'Restore the default everywhere',
|
|
51
|
+
'panels.followAllConfirmTitle': 'Restore the default everywhere?',
|
|
52
|
+
'panels.followAllConfirmDetail': 'Every row changed in this workspace goes back to following the global default.',
|
|
53
|
+
'panels.followAllConfirmAck': 'I understand: to set them up for this workspace again, I will have to change them row by row.',
|
|
54
|
+
'panels.followAllConfirmYes': 'Restore',
|
|
55
|
+
'panels.followAllConfirmNo': 'Cancel',
|
|
49
56
|
'panels.enabled': 'enabled in this project',
|
|
50
57
|
'panels.disabled': 'not enabled in this project',
|
|
51
58
|
'panels.choose': 'Choose modules',
|
|
52
59
|
'panels.buildModule': 'Build a module',
|
|
53
60
|
'panels.failed': 'Could not save the change. Try again.',
|
|
54
|
-
'panels.hintEffect': 'Disabling = the agent cannot reach that data',
|
|
55
61
|
'panels.dragHint': 'Drag to reorder',
|
|
56
62
|
'panels.unknownStep': 'No suite provides this view',
|
|
57
63
|
'panels.labelWithHint': '{label} ({hint})',
|
|
@@ -64,9 +70,10 @@ export const en = {
|
|
|
64
70
|
'panels.browseMarket': 'Browse the module market',
|
|
65
71
|
'panels.noneInstalled': 'None of these modules has its plugin installed yet',
|
|
66
72
|
'panels.noneInstalledHint': 'Once installed they come back here, and you pick which go on the panel.',
|
|
67
|
-
'panels.rowPlugin': 'Plugin',
|
|
68
73
|
'panels.market.installed': 'installed',
|
|
69
|
-
'panels.market.
|
|
74
|
+
'panels.market.notActive': 'not active',
|
|
75
|
+
'panels.market.notUsable': 'unusable',
|
|
76
|
+
'panels.market.broken': 'broken',
|
|
70
77
|
'panels.market.hasNew': 'New version',
|
|
71
78
|
'panels.market.missing': 'not installed',
|
|
72
79
|
'panels.market.unchecked': 'unknown',
|
|
@@ -96,16 +103,17 @@ export const en = {
|
|
|
96
103
|
'panels.market.confirmNo': 'Cancel',
|
|
97
104
|
'panels.market.failed': 'Failed: {reason}',
|
|
98
105
|
'panels.market.needEnv': 'Set {env} in the terminal that started the workbench first',
|
|
106
|
+
'panels.market.needCommands': 'Missing commands: {commands}',
|
|
107
|
+
'panels.market.localMark': 'local',
|
|
108
|
+
'panels.market.localHint': 'This is your machine’s own copy (not taken from the registry).',
|
|
99
109
|
'panels.market.noSource': 'This module declares no install method — install it yourself',
|
|
100
110
|
'panels.market.badSource': 'The install method is incomplete — install it yourself',
|
|
101
111
|
'panels.market.empty': 'No modules available',
|
|
102
|
-
'panels.market.sectionLocal': 'Local modules',
|
|
103
|
-
'panels.market.sectionUnlisted': 'Not from the market',
|
|
104
112
|
'panels.market.sectionPlugins': 'Installed opencli plugins',
|
|
105
113
|
'panels.market.moduleOutdated': 'update available',
|
|
106
|
-
'panels.market.moduleRefused': 'This module
|
|
114
|
+
'panels.market.moduleRefused': 'This module does not match this workbench, so it cannot be used for now.',
|
|
107
115
|
'panels.market.moduleRefusedDetail': 'Why it cannot be used: {reason}',
|
|
108
|
-
'panels.market.moduleRestartHint': '
|
|
116
|
+
'panels.market.moduleRestartHint': 'restart dsh once to bring it up',
|
|
109
117
|
'panels.market.workbenchName': 'Workbench',
|
|
110
118
|
'panels.market.workbenchLocal': 'This is the copy from your working repository; it does not come from the registry.',
|
|
111
119
|
'panels.market.pluginKeptInUse': 'Files kept for now: {names} still uses it.',
|
|
@@ -197,7 +205,7 @@ export const en = {
|
|
|
197
205
|
'panels.market.add.registryPnpm': "pnpm's own registry",
|
|
198
206
|
'panels.market.add.check': 'Check',
|
|
199
207
|
'panels.market.add.checking': 'Checking…',
|
|
200
|
-
'panels.market.add.classifying': '
|
|
208
|
+
'panels.market.add.classifying': 'Checking…',
|
|
201
209
|
'panels.market.add.change': 'Edit',
|
|
202
210
|
'panels.market.add.previewTitle': 'About to install',
|
|
203
211
|
'panels.market.add.fieldName': 'Package',
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare const dictionaries: {
|
|
|
9
9
|
readonly 'project.none': "未选择项目";
|
|
10
10
|
readonly 'project.empty': "还没有项目。用下面的「添加项目」选一个目录。";
|
|
11
11
|
readonly 'project.add': "添加项目…";
|
|
12
|
+
readonly 'project.add.busy': "正在新建工作区…";
|
|
13
|
+
readonly 'project.add.failed': "新建工作区没成功";
|
|
12
14
|
readonly 'project.search.label': "搜索工作区";
|
|
13
15
|
readonly 'project.search.placeholder': "搜索工作区(目录名 / 中文名 / 路径)";
|
|
14
16
|
readonly 'project.search.empty': "没有匹配「{query}」的工作区。";
|
|
@@ -42,18 +44,22 @@ export declare const dictionaries: {
|
|
|
42
44
|
readonly 'time.hours': "{n} 小时前";
|
|
43
45
|
readonly 'time.days': "{n} 天前";
|
|
44
46
|
readonly 'panels.title': "面板模块";
|
|
45
|
-
readonly 'panels.
|
|
46
|
-
readonly 'panels.
|
|
47
|
-
readonly 'panels.market.
|
|
48
|
-
readonly 'panels.
|
|
49
|
-
readonly 'panels.
|
|
47
|
+
readonly 'panels.groupBoardless': "无看板模块";
|
|
48
|
+
readonly 'panels.groupPlugins': "opencli 插件";
|
|
49
|
+
readonly 'panels.market.defaultHint': "打开后所有工作区默认开启,也可在工作区面板配置中单独关闭";
|
|
50
|
+
readonly 'panels.market.defaultLabel': "全局默认开启";
|
|
51
|
+
readonly 'panels.market.defaultLocked': "这份现在用不了,先更新或卸载";
|
|
50
52
|
readonly 'panels.followAll': "全部恢复默认";
|
|
53
|
+
readonly 'panels.followAllConfirmTitle': "全部恢复默认?";
|
|
54
|
+
readonly 'panels.followAllConfirmDetail': "这个工作区里改过的每一行都会清掉,之后都跟随全局。";
|
|
55
|
+
readonly 'panels.followAllConfirmAck': "我明白:清掉之后,想再按这个工作区配,得一行一行重新改。";
|
|
56
|
+
readonly 'panels.followAllConfirmYes': "恢复默认";
|
|
57
|
+
readonly 'panels.followAllConfirmNo': "取消";
|
|
51
58
|
readonly 'panels.enabled': "这个项目已启用";
|
|
52
59
|
readonly 'panels.disabled': "这个项目未启用";
|
|
53
60
|
readonly 'panels.choose': "选择模块";
|
|
54
61
|
readonly 'panels.buildModule': "造一个模块";
|
|
55
62
|
readonly 'panels.failed': "改配置失败了,再试一次。";
|
|
56
|
-
readonly 'panels.hintEffect': "停用 = agent 拿不到相关数据";
|
|
57
63
|
readonly 'panels.dragHint': "拖动调整顺序";
|
|
58
64
|
readonly 'panels.unknownStep': "这一层没有套件提供";
|
|
59
65
|
readonly 'panels.labelWithHint': "{label}({hint})";
|
|
@@ -66,9 +72,10 @@ export declare const dictionaries: {
|
|
|
66
72
|
readonly 'panels.browseMarket': "浏览模块市场";
|
|
67
73
|
readonly 'panels.noneInstalled': "这些模块要的插件都还没装";
|
|
68
74
|
readonly 'panels.noneInstalledHint': "装好之后它们会回到这里,再由你决定放哪几个上板。";
|
|
69
|
-
readonly 'panels.rowPlugin': "插件";
|
|
70
75
|
readonly 'panels.market.installed': "已安装";
|
|
71
|
-
readonly 'panels.market.
|
|
76
|
+
readonly 'panels.market.notActive': "未生效";
|
|
77
|
+
readonly 'panels.market.notUsable': "不可用";
|
|
78
|
+
readonly 'panels.market.broken': "装坏了";
|
|
72
79
|
readonly 'panels.market.hasNew': "有新版本";
|
|
73
80
|
readonly 'panels.market.missing': "未装";
|
|
74
81
|
readonly 'panels.market.unchecked': "状态未知";
|
|
@@ -98,16 +105,17 @@ export declare const dictionaries: {
|
|
|
98
105
|
readonly 'panels.market.confirmNo': "取消";
|
|
99
106
|
readonly 'panels.market.failed': "没成功:{reason}";
|
|
100
107
|
readonly 'panels.market.needEnv': "先在启动工作台的终端里设 {env}";
|
|
108
|
+
readonly 'panels.market.needCommands': "缺这几条命令:{commands}";
|
|
109
|
+
readonly 'panels.market.localMark': "本地";
|
|
110
|
+
readonly 'panels.market.localHint': "本机那份(不从源上取)。";
|
|
101
111
|
readonly 'panels.market.noSource': "这个模块没声明怎么装,只能自己动手";
|
|
102
112
|
readonly 'panels.market.badSource': "安装方式没写全,只能自己动手";
|
|
103
113
|
readonly 'panels.market.empty': "暂无可用模块";
|
|
104
|
-
readonly 'panels.market.sectionLocal': "本地模块";
|
|
105
|
-
readonly 'panels.market.sectionUnlisted': "不是从市场装的";
|
|
106
114
|
readonly 'panels.market.sectionPlugins': "已安装 opencli 插件";
|
|
107
115
|
readonly 'panels.market.moduleOutdated': "有新版";
|
|
108
|
-
readonly 'panels.market.moduleRefused': "
|
|
116
|
+
readonly 'panels.market.moduleRefused': "模块版本与工作台不匹配,暂时无法使用";
|
|
109
117
|
readonly 'panels.market.moduleRefusedDetail': "装不上的原因:{reason}";
|
|
110
|
-
readonly 'panels.market.moduleRestartHint': "
|
|
118
|
+
readonly 'panels.market.moduleRestartHint': "重启后生效";
|
|
111
119
|
readonly 'panels.market.workbenchName': "工作台";
|
|
112
120
|
readonly 'panels.market.workbenchLocal': "这份是本仓正在开发的那一份,不从源上取。";
|
|
113
121
|
readonly 'panels.market.pluginKeptInUse': "文件先留着:{names} 还要用它。";
|
|
@@ -199,7 +207,7 @@ export declare const dictionaries: {
|
|
|
199
207
|
readonly 'panels.market.add.registryPnpm': "pnpm 自己配的源";
|
|
200
208
|
readonly 'panels.market.add.check': "预检";
|
|
201
209
|
readonly 'panels.market.add.checking': "正在预检…";
|
|
202
|
-
readonly 'panels.market.add.classifying': "
|
|
210
|
+
readonly 'panels.market.add.classifying': "检测中…";
|
|
203
211
|
readonly 'panels.market.add.change': "改一下";
|
|
204
212
|
readonly 'panels.market.add.previewTitle': "将要安装";
|
|
205
213
|
readonly 'panels.market.add.fieldName': "包名";
|
|
@@ -335,7 +343,7 @@ export declare const dictionaries: {
|
|
|
335
343
|
readonly 'panel.conversation': "对话";
|
|
336
344
|
readonly 'panels.label': "全局面板";
|
|
337
345
|
};
|
|
338
|
-
en: Record<"time.now" | "time.minutes" | "time.hours" | "time.days" | "blocker.retry" | "blocker.copy" | "blocker.unknown.title" | "blocker.login.go" | "blocker.login.titleGeneric" | "blocker.login.title" | "blocker.login.manual" | "blocker.login.hint" | "blocker.forbidden.open" | "blocker.forbidden.titleGeneric" | "blocker.forbidden.title" | "blocker.forbidden.hint" | "blocker.timeout.hint" | "blocker.exec.hint" | "blocker.fix.install" | "blocker.fix.update" | "blocker.market.open" | "env.unit.failed" | "env.unit.failedHint" | "env.unit.missingPlugin" | "env.unit.hint" | "env.unit.missingCommands" | "env.unit.missingCommandsHint" | "env.unit.unchecked" | "env.unit.uncheckedHint" | "brand.name" | "toggle.open" | "toggle.collapse" | "project.label" | "workspace.section" | "project.none" | "project.empty" | "project.add" | "project.search.label" | "project.search.placeholder" | "project.search.empty" | "project.rename.row" | "project.rename.current" | "project.rename.title" | "project.rename.description" | "project.rename.field" | "project.rename.placeholder" | "project.rename.hint" | "project.rename.save" | "project.rename.saving" | "project.rename.cancel" | "project.rename.failed" | "session.new" | "session.new.label" | "session.empty" | "session.noProject" | "session.pinned" | "session.actions" | "status.idle" | "status.running" | "status.waitingApproval" | "status.planReview" | "status.waitingAnswer" | "status.completed" | "status.subagentsRunning.one" | "status.subagentsRunning.other" | "panels.title" | "panels.
|
|
346
|
+
en: Record<"time.now" | "time.minutes" | "time.hours" | "time.days" | "blocker.retry" | "blocker.copy" | "blocker.unknown.title" | "blocker.login.go" | "blocker.login.titleGeneric" | "blocker.login.title" | "blocker.login.manual" | "blocker.login.hint" | "blocker.forbidden.open" | "blocker.forbidden.titleGeneric" | "blocker.forbidden.title" | "blocker.forbidden.hint" | "blocker.timeout.hint" | "blocker.exec.hint" | "blocker.fix.install" | "blocker.fix.update" | "blocker.market.open" | "env.unit.failed" | "env.unit.failedHint" | "env.unit.missingPlugin" | "env.unit.hint" | "env.unit.missingCommands" | "env.unit.missingCommandsHint" | "env.unit.unchecked" | "env.unit.uncheckedHint" | "brand.name" | "toggle.open" | "toggle.collapse" | "project.label" | "workspace.section" | "project.none" | "project.empty" | "project.add" | "project.add.busy" | "project.add.failed" | "project.search.label" | "project.search.placeholder" | "project.search.empty" | "project.rename.row" | "project.rename.current" | "project.rename.title" | "project.rename.description" | "project.rename.field" | "project.rename.placeholder" | "project.rename.hint" | "project.rename.save" | "project.rename.saving" | "project.rename.cancel" | "project.rename.failed" | "session.new" | "session.new.label" | "session.empty" | "session.noProject" | "session.pinned" | "session.actions" | "status.idle" | "status.running" | "status.waitingApproval" | "status.planReview" | "status.waitingAnswer" | "status.completed" | "status.subagentsRunning.one" | "status.subagentsRunning.other" | "panels.title" | "panels.groupBoardless" | "panels.groupPlugins" | "panels.market.defaultHint" | "panels.market.defaultLabel" | "panels.market.defaultLocked" | "panels.followAll" | "panels.followAllConfirmTitle" | "panels.followAllConfirmDetail" | "panels.followAllConfirmAck" | "panels.followAllConfirmYes" | "panels.followAllConfirmNo" | "panels.enabled" | "panels.disabled" | "panels.choose" | "panels.buildModule" | "panels.failed" | "panels.dragHint" | "panels.unknownStep" | "panels.labelWithHint" | "panels.dep.failed" | "panels.dep.missingPlugin" | "panels.dep.missingCommands" | "panels.dep.unchecked" | "panels.tab.modules" | "panels.tab.market" | "panels.browseMarket" | "panels.noneInstalled" | "panels.noneInstalledHint" | "panels.market.installed" | "panels.market.notActive" | "panels.market.notUsable" | "panels.market.broken" | "panels.market.hasNew" | "panels.market.missing" | "panels.market.unchecked" | "panels.market.checking" | "panels.market.sectionInstalled" | "panels.market.sectionPending" | "panels.market.sectionShared" | "panels.market.sharedUsedBy" | "panels.market.listSeparator" | "panels.market.sharedMissing" | "panels.market.sharedOutdated" | "panels.market.sharedUnsatisfied" | "panels.market.sharedOk" | "panels.market.versionArrow" | "panels.market.lead" | "panels.market.install" | "panels.market.update" | "panels.market.uninstall" | "panels.market.uninstallLabel" | "panels.market.installing" | "panels.market.updating" | "panels.market.uninstalling" | "panels.market.confirmUninstallTitle" | "panels.market.confirmUninstallDetail" | "panels.market.confirmUninstallAck" | "panels.market.confirmYes" | "panels.market.confirmNo" | "panels.market.failed" | "panels.market.needEnv" | "panels.market.needCommands" | "panels.market.localMark" | "panels.market.localHint" | "panels.market.noSource" | "panels.market.badSource" | "panels.market.empty" | "panels.market.sectionPlugins" | "panels.market.moduleOutdated" | "panels.market.moduleRefused" | "panels.market.moduleRefusedDetail" | "panels.market.moduleRestartHint" | "panels.market.workbenchName" | "panels.market.workbenchLocal" | "panels.market.pluginKeptInUse" | "panels.market.pluginKeptUnsure" | "panels.market.pluginKeptHeld" | "panels.market.pluginKeptUnnamed" | "panels.market.pluginBroken" | "panels.market.restartNeeded" | "panels.market.foot" | "panels.market.recheck" | "panels.market.checkUpdates" | "panels.market.checkedAt" | "panels.market.justNow" | "panels.market.minutesAgo" | "panels.market.hoursAgo" | "panels.market.add.description" | "panels.market.add.specPlaceholder" | "panels.market.add.guideToggle" | "panels.market.add.guideHide" | "panels.market.add.guideIdTitle" | "panels.market.add.guideIdExample" | "panels.market.add.guideIdHint" | "panels.market.add.guideGitTitle" | "panels.market.add.guideGitExample" | "panels.market.add.guideGitHint" | "panels.market.add.guidePathTitle" | "panels.market.add.guidePathExample" | "panels.market.add.guidePathHint" | "panels.market.add.guideExampleLabel" | "panels.market.add.guideFill" | "panels.market.add.guideSafety" | "panels.market.add.registryLegend" | "panels.market.add.registryOfficial" | "panels.market.add.registryMirror" | "panels.market.add.registryWithHost" | "panels.market.add.registryToggle" | "panels.market.add.installVersion" | "panels.market.add.registryDefault" | "panels.market.add.registryCustom" | "panels.market.add.registryCustomPlaceholder" | "panels.market.add.registryCustomHint" | "panels.market.add.registryCustomInvalid" | "panels.market.add.run" | "panels.market.add.edit" | "panels.market.add.changeRegistry" | "panels.market.add.installingTitle" | "panels.market.add.installedTitle" | "panels.market.add.failedTitle" | "panels.market.add.cancelledTitle" | "panels.market.add.failureNetworkHost" | "panels.market.add.problemInvalid" | "panels.market.add.problemInstalled" | "panels.market.add.problemNotFound" | "panels.market.add.problemNotPackage" | "panels.market.add.problemNotBundle" | "panels.market.add.problemNotWorkbenchModule" | "panels.market.add.problemNotModuleOrPlugin" | "panels.market.add.failureNotModuleOrPlugin" | "panels.market.add.installedPlugin" | "panels.market.add.pluginPreview" | "panels.market.add.pluginAlias" | "panels.market.add.problemNetwork" | "panels.market.add.problemUnknown" | "panels.market.add.failureNetwork" | "panels.market.add.failureNotFound" | "panels.market.add.failureNoMatchingVersion" | "panels.market.add.failureDiskFull" | "panels.market.add.failurePermission" | "panels.market.add.failureBuildBlocked" | "panels.market.add.failureIntegrity" | "panels.market.add.failureTimeout" | "panels.market.add.failurePnpmMissing" | "panels.market.add.failureGeneric" | "panels.market.add.approveTitle" | "panels.market.add.approveCaution" | "panels.market.add.approveRun" | "panels.market.add.restart" | "panels.market.add.tookEffect" | "panels.market.add.details" | "panels.market.add.open" | "panels.market.add.title" | "panels.market.add.intro" | "panels.market.add.specLabel" | "panels.market.add.specHint" | "panels.market.add.exampleTitle" | "panels.market.add.exampleFill" | "panels.market.add.registryLabel" | "panels.market.add.registryProfile" | "panels.market.add.registryPnpm" | "panels.market.add.check" | "panels.market.add.checking" | "panels.market.add.classifying" | "panels.market.add.change" | "panels.market.add.previewTitle" | "panels.market.add.fieldName" | "panels.market.add.fieldVersion" | "panels.market.add.fieldDescription" | "panels.market.add.fieldSource" | "panels.market.add.install" | "panels.market.add.installing" | "panels.market.add.cancel" | "panels.market.add.close" | "panels.market.add.retry" | "panels.market.add.changeSource" | "panels.market.add.approveBuilds" | "panels.market.add.approveHint" | "panels.market.add.doneApplied" | "panels.market.add.doneRestart" | "panels.market.add.cancelled" | "panels.market.add.failed" | "panels.market.add.removed" | "panels.market.add.supplyPending" | "panels.market.add.supplyFailed" | "panels.market.add.notModule" | "panels.market.add.removedRestart" | "panels.market.add.remove" | "panels.market.add.problem.invalidSpec" | "panels.market.add.problem.alreadyInstalled" | "panels.market.add.problem.notFound" | "panels.market.add.problem.notAPackage" | "panels.market.add.problem.notABundle" | "panels.market.add.problem.network" | "panels.market.add.problem.unknown" | "panels.market.add.reason.invalidSpec" | "panels.market.add.reason.incompatible" | "panels.market.add.reason.notBundle" | "panels.market.add.reason.notRemovable" | "panels.market.add.reason.bundleInUse" | "panels.market.add.reason.stopProfile" | "panels.market.add.reason.staleApproval" | "panels.market.add.reason.operationError" | "panels.market.add.reason.buildBlocked" | "panels.market.add.reason.pnpmMissing" | "panels.market.add.reason.noMatchingVersion" | "panels.market.add.reason.diskFull" | "panels.market.add.reason.permission" | "panels.market.add.reason.integrity" | "panels.market.add.reason.timeout" | "panels.market.add.reason.network" | "panels.market.add.reason.notFound" | "panels.market.add.reason.unknown" | "blocker.fix.running" | "blocker.fix.failed" | "blocker.retry.running" | "panels.reading" | "panels.cardBroken" | "panels.cardRetry" | "panels.empty" | "panels.emptyHint" | "env.title" | "env.checking" | "env.installing" | "env.failed" | "env.elapsed" | "env.stepFailed.install" | "env.stepFailed.path" | "env.stepFailed.shell" | "env.bridge.ok" | "env.bridge.short" | "env.bridge.why" | "env.bridge.daemon" | "env.bridge.extension" | "env.bridge.extensionLink" | "env.bridge.profile" | "env.bridge.stale" | "env.bridge.unknown" | "env.fix.title" | "env.fix.why" | "env.fix.whyPath" | "env.fix.whyShell" | "env.fix.step" | "env.fix.stepPath" | "env.fix.stepShell" | "env.fix.permission" | "env.fix.network" | "env.fix.details" | "env.retry" | "env.copyCommand" | "env.copied" | "env.step.opencli" | "env.step.codingPlugin" | "env.step.bridge" | "env.step.warm" | "env.warm.done" | "env.warm.short" | "rightbar.label" | "rightbar.expand" | "rightbar.collapse" | "rightbar.column.label" | "rightbar.column.workbench" | "rightbar.column.dsh" | "rightbar.refresh" | "rightbar.refreshing" | "rightbar.updatedAt" | "rightbar.noProject" | "rightbar.openPlatform" | "coding.notARepo.title" | "error.unknown" | "board.title" | "panel.conversation" | "panels.label", string>;
|
|
339
347
|
};
|
|
340
348
|
export type { WorkbenchMessages };
|
|
341
349
|
export interface Dictionaries {
|
package/dist/i18n/zh.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export declare const zh: {
|
|
|
7
7
|
readonly 'project.none': "未选择项目";
|
|
8
8
|
readonly 'project.empty': "还没有项目。用下面的「添加项目」选一个目录。";
|
|
9
9
|
readonly 'project.add': "添加项目…";
|
|
10
|
+
readonly 'project.add.busy': "正在新建工作区…";
|
|
11
|
+
readonly 'project.add.failed': "新建工作区没成功";
|
|
10
12
|
readonly 'project.search.label': "搜索工作区";
|
|
11
13
|
readonly 'project.search.placeholder': "搜索工作区(目录名 / 中文名 / 路径)";
|
|
12
14
|
readonly 'project.search.empty': "没有匹配「{query}」的工作区。";
|
|
@@ -40,18 +42,22 @@ export declare const zh: {
|
|
|
40
42
|
readonly 'time.hours': "{n} 小时前";
|
|
41
43
|
readonly 'time.days': "{n} 天前";
|
|
42
44
|
readonly 'panels.title': "面板模块";
|
|
43
|
-
readonly 'panels.
|
|
44
|
-
readonly 'panels.
|
|
45
|
-
readonly 'panels.market.
|
|
46
|
-
readonly 'panels.
|
|
47
|
-
readonly 'panels.
|
|
45
|
+
readonly 'panels.groupBoardless': "无看板模块";
|
|
46
|
+
readonly 'panels.groupPlugins': "opencli 插件";
|
|
47
|
+
readonly 'panels.market.defaultHint': "打开后所有工作区默认开启,也可在工作区面板配置中单独关闭";
|
|
48
|
+
readonly 'panels.market.defaultLabel': "全局默认开启";
|
|
49
|
+
readonly 'panels.market.defaultLocked': "这份现在用不了,先更新或卸载";
|
|
48
50
|
readonly 'panels.followAll': "全部恢复默认";
|
|
51
|
+
readonly 'panels.followAllConfirmTitle': "全部恢复默认?";
|
|
52
|
+
readonly 'panels.followAllConfirmDetail': "这个工作区里改过的每一行都会清掉,之后都跟随全局。";
|
|
53
|
+
readonly 'panels.followAllConfirmAck': "我明白:清掉之后,想再按这个工作区配,得一行一行重新改。";
|
|
54
|
+
readonly 'panels.followAllConfirmYes': "恢复默认";
|
|
55
|
+
readonly 'panels.followAllConfirmNo': "取消";
|
|
49
56
|
readonly 'panels.enabled': "这个项目已启用";
|
|
50
57
|
readonly 'panels.disabled': "这个项目未启用";
|
|
51
58
|
readonly 'panels.choose': "选择模块";
|
|
52
59
|
readonly 'panels.buildModule': "造一个模块";
|
|
53
60
|
readonly 'panels.failed': "改配置失败了,再试一次。";
|
|
54
|
-
readonly 'panels.hintEffect': "停用 = agent 拿不到相关数据";
|
|
55
61
|
readonly 'panels.dragHint': "拖动调整顺序";
|
|
56
62
|
readonly 'panels.unknownStep': "这一层没有套件提供";
|
|
57
63
|
readonly 'panels.labelWithHint': "{label}({hint})";
|
|
@@ -64,9 +70,10 @@ export declare const zh: {
|
|
|
64
70
|
readonly 'panels.browseMarket': "浏览模块市场";
|
|
65
71
|
readonly 'panels.noneInstalled': "这些模块要的插件都还没装";
|
|
66
72
|
readonly 'panels.noneInstalledHint': "装好之后它们会回到这里,再由你决定放哪几个上板。";
|
|
67
|
-
readonly 'panels.rowPlugin': "插件";
|
|
68
73
|
readonly 'panels.market.installed': "已安装";
|
|
69
|
-
readonly 'panels.market.
|
|
74
|
+
readonly 'panels.market.notActive': "未生效";
|
|
75
|
+
readonly 'panels.market.notUsable': "不可用";
|
|
76
|
+
readonly 'panels.market.broken': "装坏了";
|
|
70
77
|
readonly 'panels.market.hasNew': "有新版本";
|
|
71
78
|
readonly 'panels.market.missing': "未装";
|
|
72
79
|
readonly 'panels.market.unchecked': "状态未知";
|
|
@@ -96,16 +103,17 @@ export declare const zh: {
|
|
|
96
103
|
readonly 'panels.market.confirmNo': "取消";
|
|
97
104
|
readonly 'panels.market.failed': "没成功:{reason}";
|
|
98
105
|
readonly 'panels.market.needEnv': "先在启动工作台的终端里设 {env}";
|
|
106
|
+
readonly 'panels.market.needCommands': "缺这几条命令:{commands}";
|
|
107
|
+
readonly 'panels.market.localMark': "本地";
|
|
108
|
+
readonly 'panels.market.localHint': "本机那份(不从源上取)。";
|
|
99
109
|
readonly 'panels.market.noSource': "这个模块没声明怎么装,只能自己动手";
|
|
100
110
|
readonly 'panels.market.badSource': "安装方式没写全,只能自己动手";
|
|
101
111
|
readonly 'panels.market.empty': "暂无可用模块";
|
|
102
|
-
readonly 'panels.market.sectionLocal': "本地模块";
|
|
103
|
-
readonly 'panels.market.sectionUnlisted': "不是从市场装的";
|
|
104
112
|
readonly 'panels.market.sectionPlugins': "已安装 opencli 插件";
|
|
105
113
|
readonly 'panels.market.moduleOutdated': "有新版";
|
|
106
|
-
readonly 'panels.market.moduleRefused': "
|
|
114
|
+
readonly 'panels.market.moduleRefused': "模块版本与工作台不匹配,暂时无法使用";
|
|
107
115
|
readonly 'panels.market.moduleRefusedDetail': "装不上的原因:{reason}";
|
|
108
|
-
readonly 'panels.market.moduleRestartHint': "
|
|
116
|
+
readonly 'panels.market.moduleRestartHint': "重启后生效";
|
|
109
117
|
readonly 'panels.market.workbenchName': "工作台";
|
|
110
118
|
readonly 'panels.market.workbenchLocal': "这份是本仓正在开发的那一份,不从源上取。";
|
|
111
119
|
readonly 'panels.market.pluginKeptInUse': "文件先留着:{names} 还要用它。";
|
|
@@ -197,7 +205,7 @@ export declare const zh: {
|
|
|
197
205
|
readonly 'panels.market.add.registryPnpm': "pnpm 自己配的源";
|
|
198
206
|
readonly 'panels.market.add.check': "预检";
|
|
199
207
|
readonly 'panels.market.add.checking': "正在预检…";
|
|
200
|
-
readonly 'panels.market.add.classifying': "
|
|
208
|
+
readonly 'panels.market.add.classifying': "检测中…";
|
|
201
209
|
readonly 'panels.market.add.change': "改一下";
|
|
202
210
|
readonly 'panels.market.add.previewTitle': "将要安装";
|
|
203
211
|
readonly 'panels.market.add.fieldName': "包名";
|