@nextclaw/ui 0.15.23 → 0.15.25
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/CHANGELOG.md +38 -0
- package/dist/assets/{api-Glw2OGXK.js → api-FK7tikI1.js} +4 -4
- package/dist/assets/appearance-settings-page-BYbvl2wj.js +1 -0
- package/dist/assets/{channels-list-page-C7E4Sxwd.js → channels-list-page-CocdcIko.js} +2 -2
- package/dist/assets/{chat-page-BT6dNI-4.js → chat-page-C5E-LLVd.js} +1 -1
- package/dist/assets/config-split-page-CA_a0AJ5.js +1 -0
- package/dist/assets/confirm-dialog-CxZfenjK.js +5 -0
- package/dist/assets/desktop-update-config-BEKC8Ly9.js +1 -0
- package/dist/assets/{dist-dv_SUR54.js → dist-BH7W5yCi.js} +1 -1
- package/dist/assets/{dist-CtLyEJeO.js → dist-CaYdVVeO.js} +1 -1
- package/dist/assets/doc-browser-Cl2ldE3f.js +1 -0
- package/dist/assets/doc-browser-DXCSd63E.js +1 -0
- package/dist/assets/{doc-browser-context-BIBjkwfV.js → doc-browser-context-FDPs3gJf.js} +1 -1
- package/dist/assets/form-actions-0c0aw_bl.js +1 -0
- package/dist/assets/i18n-provider-DkITJNz8.js +1 -0
- package/dist/assets/index-CQ2LcI2p.css +1 -0
- package/dist/assets/index-CrdfvBVg.js +107 -0
- package/dist/assets/loader-circle-DHtUxCIA.js +1 -0
- package/dist/assets/mcp-marketplace-page-Bc_jI5iH.js +9 -0
- package/dist/assets/mcp-marketplace-page-CzCieD9r.js +1 -0
- package/dist/assets/model-config-page-C4jw-pcj.js +1 -0
- package/dist/assets/{navigation-link-CB0OQbnY.js → navigation-link-CVy0_kVl.js} +2 -2
- package/dist/assets/plus-CG1RwZQq.js +1 -0
- package/dist/assets/provider-scoped-model-input-CmH4BFvc.js +1 -0
- package/dist/assets/providers-config-page-CJQjwzaw.js +1 -0
- package/dist/assets/react-DjFBVA0n.js +8 -0
- package/dist/assets/{refresh-cw-Ba0LZou4.js → refresh-cw-j2bl79Ea.js} +1 -1
- package/dist/assets/remote-BIlpD3yL.js +1 -0
- package/dist/assets/rotate-cw-bKG8zH8M.js +1 -0
- package/dist/assets/runtime-config-page-B_x2Glz5.js +1 -0
- package/dist/assets/{save-DTOAvqzt.js → save-BKNrtK81.js} +1 -1
- package/dist/assets/{search-D4X5DNMe.js → search-CkOm65W_.js} +1 -1
- package/dist/assets/{search-config-page-Cr6254K5.js → search-config-page-BaIijtmO.js} +1 -1
- package/dist/assets/{secrets-config-page-W2Hx332d.js → secrets-config-page-CJjtdFAl.js} +2 -2
- package/dist/assets/security-config-DB8apj09.js +1 -0
- package/dist/assets/{select-CDv0g2Pj.js → select-Ea7ffKCE.js} +2 -2
- package/dist/assets/{settings-2-CoxzNABp.js → settings-2-CtyN3m_V.js} +1 -1
- package/dist/assets/skeleton-Bt6zxcAB.js +1 -0
- package/dist/assets/{tag-chip-CjkZEoS2.js → tag-chip-C9l4xsKp.js} +1 -1
- package/dist/assets/x-CowtCu9Z.js +1 -0
- package/dist/index.html +20 -20
- package/package.json +8 -8
- package/src/features/chat/features/conversation/components/__tests__/session-conversation-area.test.tsx +30 -1
- package/src/features/chat/features/conversation/components/session-conversation-area.tsx +1 -1
- package/src/features/chat/features/conversation/hooks/__tests__/use-session-provider-model-catalog.test.tsx +54 -2
- package/src/features/chat/features/conversation/hooks/use-chat-composer-reference-intent.ts +10 -1
- package/src/features/chat/features/conversation/hooks/use-session-provider-model-catalog.ts +76 -1
- package/src/features/chat/features/conversation/utils/session-conversation-input-toolbar.utils.ts +6 -1
- package/src/features/chat/features/input/utils/__tests__/chat-inline-token.utils.test.ts +29 -0
- package/src/features/chat/features/input/utils/__tests__/chat-input-bar.utils.test.ts +12 -3
- package/src/features/chat/features/input/utils/chat-composer-token-protocol.utils.ts +5 -0
- package/src/features/chat/features/input/utils/chat-conversation-excerpt-token.utils.ts +59 -0
- package/src/features/chat/features/input/utils/chat-inline-token.utils.ts +42 -16
- package/src/features/chat/features/input/utils/chat-input-toolbar.utils.ts +50 -14
- package/src/features/chat/features/message/components/chat-message-list.container.tsx +40 -0
- package/src/features/chat/features/message/utils/chat-message-texts.utils.ts +5 -0
- package/src/features/chat/features/ncp/hooks/__tests__/use-hydrated-ncp-agent.test.tsx +40 -3
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-file-preview.selection.test.tsx +66 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-file-preview.test.tsx +13 -1
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel-content.test.tsx +573 -90
- package/src/features/chat/features/workspace/components/__tests__/workspace-text-selection-menu.test.tsx +11 -4
- package/src/features/chat/features/workspace/components/chat-session-workspace-directory-browser.tsx +389 -288
- package/src/features/chat/features/workspace/components/chat-session-workspace-file-breadcrumbs.tsx +54 -35
- package/src/features/chat/features/workspace/components/chat-session-workspace-file-preview.tsx +79 -148
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-content.tsx +149 -94
- package/src/features/chat/features/workspace/components/project-files/__tests__/workspace-directory-entry-menu.test.tsx +50 -0
- package/src/features/chat/features/workspace/components/project-files/workspace-directory-entry-menu.tsx +209 -0
- package/src/features/chat/features/workspace/components/project-files/workspace-directory-tree.tsx +411 -0
- package/src/features/chat/features/workspace/components/project-files/workspace-new-folder-tree-item.tsx +112 -0
- package/src/features/chat/features/workspace/components/project-files/workspace-project-files-toolbar.tsx +64 -0
- package/src/features/chat/features/workspace/components/workspace-text-selection-menu.tsx +17 -195
- package/src/features/chat/features/workspace/hooks/use-workspace-explorer-layout.ts +88 -0
- package/src/features/chat/features/workspace/hooks/use-workspace-file-actions.ts +335 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-file-path-mutation.utils.ts +58 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-file-tab.utils.ts +23 -22
- package/src/features/chat/features/workspace/utils/chat-workspace-panel-layout.utils.ts +13 -4
- package/src/features/chat/managers/__tests__/chat-composer-intent.manager.test.ts +94 -45
- package/src/features/chat/managers/__tests__/chat-thread.manager.test.ts +103 -99
- package/src/features/chat/managers/chat-composer-intent.manager.ts +83 -34
- package/src/features/chat/managers/chat-thread.manager.ts +132 -128
- package/src/features/chat/stores/__tests__/chat-thread.store.test.ts +20 -40
- package/src/features/chat/stores/chat-thread.store.ts +47 -74
- package/src/features/chat/types/chat-input-bar.types.ts +3 -0
- package/src/features/side-dock/components/__tests__/side-dock.test.tsx +1 -0
- package/src/features/side-dock/configs/side-dock-built-in-items.config.ts +0 -9
- package/src/shared/components/resizable-right-panel/__tests__/resizable-right-panel.test.tsx +35 -38
- package/src/shared/components/resizable-right-panel/resizable-right-panel.tsx +25 -19
- package/src/shared/components/ui/context-menu/__tests__/context-menu.test.tsx +60 -34
- package/src/shared/components/ui/context-menu/context-menu.tsx +95 -68
- package/src/shared/lib/api/managers/client.manager.ts +31 -17
- package/src/shared/lib/api/server-path/server-path.types.ts +66 -0
- package/src/shared/lib/api/types.ts +145 -116
- package/src/shared/lib/api/utils/server-path.utils.ts +35 -11
- package/src/shared/lib/i18n/locales/en-US/chat.json +49 -1
- package/src/shared/lib/i18n/locales/zh-CN/chat.json +49 -1
- package/dist/assets/appearance-settings-page-Bl_W_9m7.js +0 -1
- package/dist/assets/config-split-page-D5BgtKrm.js +0 -1
- package/dist/assets/confirm-dialog-Bf907Azu.js +0 -5
- package/dist/assets/desktop-update-config-BwuyBPJb.js +0 -1
- package/dist/assets/doc-browser-C23NDGh5.js +0 -1
- package/dist/assets/doc-browser-DlOOhBxI.js +0 -1
- package/dist/assets/form-actions-DAzi68Cn.js +0 -1
- package/dist/assets/index-BLNg2yg0.css +0 -1
- package/dist/assets/index-D3EKjEyK.js +0 -107
- package/dist/assets/loader-circle-BSg5u0r4.js +0 -1
- package/dist/assets/mcp-marketplace-page-ByhvQQj5.js +0 -9
- package/dist/assets/mcp-marketplace-page-CytXwnUs.js +0 -1
- package/dist/assets/model-config-page-bgEx3MjQ.js +0 -1
- package/dist/assets/plus-CNjWdLhZ.js +0 -1
- package/dist/assets/provider-scoped-model-input-8F6JMd2n.js +0 -1
- package/dist/assets/providers-config-page-CxpTjR81.js +0 -1
- package/dist/assets/react-Bk2ydNTe.js +0 -8
- package/dist/assets/remote-Dv38PuMV.js +0 -1
- package/dist/assets/rotate-cw-IkYVk9JX.js +0 -1
- package/dist/assets/runtime-config-page-C0ByyUVr.js +0 -1
- package/dist/assets/security-config-1E8OF4kR.js +0 -1
- package/dist/assets/skeleton-DW018fJv.js +0 -1
- package/dist/assets/use-confirm-dialog-CavtY1vJ.js +0 -1
- package/dist/assets/x-PTXYTEwz.js +0 -1
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import type { NcpSessionStatus } from '@nextclaw/ncp';
|
|
2
2
|
import type { RuntimeEntryView, NcpSessionSummaryView } from './ncp-session.types';
|
|
3
|
-
export type {
|
|
4
|
-
|
|
3
|
+
export type {
|
|
4
|
+
ProjectAddExistingRequest,
|
|
5
|
+
ProjectCreateRequest,
|
|
6
|
+
ProjectListView,
|
|
7
|
+
ProjectTemplateView,
|
|
8
|
+
ProjectView,
|
|
9
|
+
} from '@nextclaw/client-sdk';
|
|
10
|
+
export type {
|
|
11
|
+
SessionEntryView,
|
|
12
|
+
RuntimeEntryView,
|
|
13
|
+
SessionTypeIconView,
|
|
14
|
+
SessionMessageView,
|
|
15
|
+
SessionEventView,
|
|
16
|
+
NcpSessionSummaryView,
|
|
17
|
+
NcpSessionsListView,
|
|
18
|
+
NcpMessageView,
|
|
19
|
+
NcpSessionMessagesView,
|
|
20
|
+
SessionContextWindowView,
|
|
21
|
+
} from './ncp-session.types';
|
|
5
22
|
|
|
6
23
|
// API Types - matching backend response format
|
|
7
24
|
export type ApiError = {
|
|
@@ -10,18 +27,11 @@ export type ApiError = {
|
|
|
10
27
|
details?: Record<string, unknown>;
|
|
11
28
|
};
|
|
12
29
|
|
|
13
|
-
export type ApiResponse<T> =
|
|
14
|
-
| { ok: true; data: T }
|
|
15
|
-
| { ok: false; error: ApiError };
|
|
30
|
+
export type ApiResponse<T> = { ok: true; data: T } | { ok: false; error: ApiError };
|
|
16
31
|
|
|
17
32
|
export type AppMetaView = { name: string; productVersion: string };
|
|
18
33
|
|
|
19
|
-
export type BootstrapPhase =
|
|
20
|
-
| 'kernel-starting'
|
|
21
|
-
| 'shell-ready'
|
|
22
|
-
| 'hydrating-capabilities'
|
|
23
|
-
| 'ready'
|
|
24
|
-
| 'error';
|
|
34
|
+
export type BootstrapPhase = 'kernel-starting' | 'shell-ready' | 'hydrating-capabilities' | 'ready' | 'error';
|
|
25
35
|
|
|
26
36
|
export type BootstrapStageState = 'pending' | 'running' | 'ready' | 'error';
|
|
27
37
|
|
|
@@ -56,10 +66,13 @@ export type BootstrapStatusView = {
|
|
|
56
66
|
lastError?: string;
|
|
57
67
|
};
|
|
58
68
|
|
|
59
|
-
export type ThinkingLevel =
|
|
60
|
-
export type AgentModelsView = Record<
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
export type ThinkingLevel = 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'adaptive' | 'xhigh';
|
|
70
|
+
export type AgentModelsView = Record<
|
|
71
|
+
string,
|
|
72
|
+
{
|
|
73
|
+
params: Record<string, unknown>;
|
|
74
|
+
} & Record<string, unknown>
|
|
75
|
+
>;
|
|
63
76
|
|
|
64
77
|
export type ProviderInstanceView = {
|
|
65
78
|
providerId: string;
|
|
@@ -73,12 +86,15 @@ export type ProviderInstanceView = {
|
|
|
73
86
|
apiKeyMasked?: string;
|
|
74
87
|
apiBase?: string | null;
|
|
75
88
|
extraHeaders?: Record<string, string> | null;
|
|
76
|
-
wireApi?:
|
|
89
|
+
wireApi?: 'auto' | 'chat' | 'responses' | null;
|
|
77
90
|
models?: string[];
|
|
78
|
-
modelConfig?: Record<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
91
|
+
modelConfig?: Record<
|
|
92
|
+
string,
|
|
93
|
+
{
|
|
94
|
+
thinking?: { supported: ThinkingLevel[]; default?: ThinkingLevel | null };
|
|
95
|
+
vision?: boolean;
|
|
96
|
+
}
|
|
97
|
+
>;
|
|
82
98
|
};
|
|
83
99
|
|
|
84
100
|
export type ProviderConfigView = ProviderInstanceView;
|
|
@@ -90,28 +106,34 @@ export type ProviderConfigUpdate = {
|
|
|
90
106
|
apiKey?: string | null;
|
|
91
107
|
apiBase?: string | null;
|
|
92
108
|
extraHeaders?: Record<string, string> | null;
|
|
93
|
-
wireApi?:
|
|
109
|
+
wireApi?: 'auto' | 'chat' | 'responses' | null;
|
|
94
110
|
models?: string[] | null;
|
|
95
|
-
modelConfig?: Record<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
111
|
+
modelConfig?: Record<
|
|
112
|
+
string,
|
|
113
|
+
{
|
|
114
|
+
thinking?: {
|
|
115
|
+
supported?: ThinkingLevel[];
|
|
116
|
+
default?: ThinkingLevel | null;
|
|
117
|
+
};
|
|
118
|
+
vision?: boolean;
|
|
119
|
+
}
|
|
120
|
+
> | null;
|
|
99
121
|
};
|
|
100
122
|
|
|
101
123
|
export type ProviderConnectionTestRequest = ProviderConfigUpdate & {
|
|
102
124
|
model?: string | null;
|
|
103
125
|
};
|
|
104
126
|
|
|
105
|
-
export type ProviderModelDiscoveryRequest = Pick<
|
|
106
|
-
ProviderConfigUpdate,
|
|
107
|
-
'apiKey' | 'apiBase' | 'extraHeaders'
|
|
108
|
-
>;
|
|
127
|
+
export type ProviderModelDiscoveryRequest = Pick<ProviderConfigUpdate, 'apiKey' | 'apiBase' | 'extraHeaders'>;
|
|
109
128
|
|
|
110
129
|
export type ProviderCreateRequest = ProviderConfigUpdate & {
|
|
111
130
|
providerId?: string | null;
|
|
112
131
|
};
|
|
113
132
|
|
|
114
|
-
export type ProviderCreateResult = {
|
|
133
|
+
export type ProviderCreateResult = {
|
|
134
|
+
providerId: string;
|
|
135
|
+
provider: ProviderInstanceView;
|
|
136
|
+
};
|
|
115
137
|
export type ProviderDeleteResult = { deleted: boolean; providerId: string };
|
|
116
138
|
export type ProvidersView = { providers: Record<string, ProviderInstanceView> };
|
|
117
139
|
|
|
@@ -152,21 +174,24 @@ export type ProviderModelCatalogView = {
|
|
|
152
174
|
refreshing: boolean;
|
|
153
175
|
lastRefreshStartedAt: string | null;
|
|
154
176
|
lastRefreshCompletedAt: string | null;
|
|
155
|
-
providers: Record<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
177
|
+
providers: Record<
|
|
178
|
+
string,
|
|
179
|
+
{
|
|
180
|
+
providerId: string;
|
|
181
|
+
models: string[];
|
|
182
|
+
source: 'provider' | 'catalog' | null;
|
|
183
|
+
fetchedAt: string | null;
|
|
184
|
+
lastError: {
|
|
185
|
+
message: string;
|
|
186
|
+
occurredAt: string;
|
|
187
|
+
} | null;
|
|
188
|
+
}
|
|
189
|
+
>;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
export type SearchProviderName = 'bocha' | 'tavily' | 'brave' | 'exa';
|
|
193
|
+
export type BochaFreshnessValue = 'noLimit' | 'oneDay' | 'oneWeek' | 'oneMonth' | 'oneYear' | string;
|
|
194
|
+
export type TavilySearchDepthValue = 'basic' | 'advanced';
|
|
170
195
|
|
|
171
196
|
export type SearchProviderConfigView = {
|
|
172
197
|
enabled: boolean;
|
|
@@ -227,7 +252,7 @@ export type SearchConfigUpdate = {
|
|
|
227
252
|
|
|
228
253
|
export type ProviderAuthStartResult = {
|
|
229
254
|
provider: string;
|
|
230
|
-
kind:
|
|
255
|
+
kind: 'device_code';
|
|
231
256
|
methodId?: string;
|
|
232
257
|
sessionId: string;
|
|
233
258
|
verificationUri: string;
|
|
@@ -242,21 +267,31 @@ export type ProviderAuthPollRequest = { sessionId: string };
|
|
|
242
267
|
|
|
243
268
|
export type ProviderAuthPollResult = {
|
|
244
269
|
provider: string;
|
|
245
|
-
status:
|
|
270
|
+
status: 'pending' | 'authorized' | 'denied' | 'expired' | 'error';
|
|
246
271
|
message?: string;
|
|
247
272
|
nextPollMs?: number;
|
|
248
273
|
};
|
|
249
274
|
|
|
250
|
-
export type ProviderAuthImportResult = {
|
|
275
|
+
export type ProviderAuthImportResult = {
|
|
276
|
+
provider: string;
|
|
277
|
+
status: 'imported';
|
|
278
|
+
source: 'cli';
|
|
279
|
+
expiresAt?: string;
|
|
280
|
+
};
|
|
251
281
|
|
|
252
282
|
export type {
|
|
253
283
|
AuthEnabledUpdateRequest,
|
|
254
284
|
AuthLoginRequest,
|
|
255
285
|
AuthPasswordUpdateRequest,
|
|
256
286
|
AuthSetupRequest,
|
|
257
|
-
AuthStatusView
|
|
287
|
+
AuthStatusView,
|
|
258
288
|
} from './auth.types';
|
|
259
|
-
export type {
|
|
289
|
+
export type {
|
|
290
|
+
ChannelAuthPollRequest,
|
|
291
|
+
ChannelAuthPollResult,
|
|
292
|
+
ChannelAuthStartRequest,
|
|
293
|
+
ChannelAuthStartResult,
|
|
294
|
+
} from './channel-auth.types';
|
|
260
295
|
|
|
261
296
|
export type {
|
|
262
297
|
RemoteAccessView,
|
|
@@ -269,7 +304,7 @@ export type {
|
|
|
269
304
|
RemoteServiceActionResult,
|
|
270
305
|
RemoteServiceView,
|
|
271
306
|
RemoteSettingsUpdateRequest,
|
|
272
|
-
RemoteSettingsView
|
|
307
|
+
RemoteSettingsView,
|
|
273
308
|
} from './remote.types';
|
|
274
309
|
export type {
|
|
275
310
|
RuntimeActionCapability,
|
|
@@ -279,7 +314,7 @@ export type {
|
|
|
279
314
|
RuntimeControlView,
|
|
280
315
|
RuntimeLifecycleState,
|
|
281
316
|
RuntimeServiceState,
|
|
282
|
-
RuntimeControlActionResult
|
|
317
|
+
RuntimeControlActionResult,
|
|
283
318
|
} from './runtime-control.types';
|
|
284
319
|
|
|
285
320
|
export type AgentProfileView = {
|
|
@@ -331,7 +366,7 @@ export type AgentDeleteResult = {
|
|
|
331
366
|
};
|
|
332
367
|
|
|
333
368
|
export type BindingPeerView = {
|
|
334
|
-
kind:
|
|
369
|
+
kind: 'direct' | 'group' | 'channel';
|
|
335
370
|
id: string;
|
|
336
371
|
};
|
|
337
372
|
|
|
@@ -345,7 +380,7 @@ export type AgentBindingView = {
|
|
|
345
380
|
};
|
|
346
381
|
|
|
347
382
|
export type SessionConfigView = {
|
|
348
|
-
dmScope?:
|
|
383
|
+
dmScope?: 'main' | 'per-peer' | 'per-channel-peer' | 'per-account-channel-peer';
|
|
349
384
|
};
|
|
350
385
|
|
|
351
386
|
export type SessionSkillEntryView = {
|
|
@@ -391,51 +426,29 @@ export type SessionPatchUpdate = {
|
|
|
391
426
|
clearHistory?: boolean;
|
|
392
427
|
};
|
|
393
428
|
|
|
394
|
-
export type
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
export type ServerPathSearchEntryView = {
|
|
413
|
-
name: string;
|
|
414
|
-
path: string;
|
|
415
|
-
relativePath: string;
|
|
416
|
-
parentRelativePath: string;
|
|
417
|
-
kind: "directory" | "file";
|
|
418
|
-
hidden: boolean;
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
export type ServerPathSearchView = {
|
|
422
|
-
basePath: string;
|
|
423
|
-
query: string;
|
|
424
|
-
entries: ServerPathSearchEntryView[];
|
|
425
|
-
truncated: boolean;
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
export type ServerPathDirectoryCreateRequest = { parentPath: string; name: string };
|
|
429
|
-
|
|
430
|
-
export type ServerPathDirectoryCreateView = { path: string };
|
|
431
|
-
|
|
432
|
-
export type ServerPathReadView = { requestedPath: string; resolvedPath: string; kind: "text" | "markdown" | "binary"; sizeBytes: number; startLine?: number; truncated: boolean; text?: string; languageHint?: string | null };
|
|
429
|
+
export type {
|
|
430
|
+
ServerPathBreadcrumbView,
|
|
431
|
+
ServerPathBrowseView,
|
|
432
|
+
ServerPathDirectoryCreateRequest,
|
|
433
|
+
ServerPathDirectoryCreateView,
|
|
434
|
+
ServerPathEntryDeleteView,
|
|
435
|
+
ServerPathEntryRenameRequest,
|
|
436
|
+
ServerPathEntryRenameView,
|
|
437
|
+
ServerPathEntryView,
|
|
438
|
+
ServerPathFileCreateRequest,
|
|
439
|
+
ServerPathFileCreateView,
|
|
440
|
+
ServerPathFilesUploadView,
|
|
441
|
+
ServerPathLocationView,
|
|
442
|
+
ServerPathReadView,
|
|
443
|
+
ServerPathSearchEntryView,
|
|
444
|
+
ServerPathSearchView,
|
|
445
|
+
} from './server-path/server-path.types';
|
|
433
446
|
|
|
434
447
|
export type PanelAppEntryView = {
|
|
435
448
|
id: string;
|
|
436
449
|
appId: string;
|
|
437
450
|
fileName: string;
|
|
438
|
-
kind:
|
|
451
|
+
kind: 'single-file' | 'folder';
|
|
439
452
|
title: string;
|
|
440
453
|
description?: string;
|
|
441
454
|
icon?: string;
|
|
@@ -467,12 +480,12 @@ export type {
|
|
|
467
480
|
} from './chat-session-type.types';
|
|
468
481
|
|
|
469
482
|
export type CronScheduleView =
|
|
470
|
-
| { kind:
|
|
471
|
-
| { kind:
|
|
472
|
-
| { kind:
|
|
483
|
+
| { kind: 'at'; atMs?: number | null }
|
|
484
|
+
| { kind: 'every'; everyMs?: number | null }
|
|
485
|
+
| { kind: 'cron'; expr?: string | null; tz?: string | null };
|
|
473
486
|
|
|
474
487
|
export type CronPayloadView = {
|
|
475
|
-
kind?:
|
|
488
|
+
kind?: 'system_event' | 'agent_turn';
|
|
476
489
|
message: string;
|
|
477
490
|
agentId?: string | null;
|
|
478
491
|
sessionId?: string | null;
|
|
@@ -481,7 +494,7 @@ export type CronPayloadView = {
|
|
|
481
494
|
export type CronJobStateView = {
|
|
482
495
|
nextRunAt?: string | null;
|
|
483
496
|
lastRunAt?: string | null;
|
|
484
|
-
lastStatus?:
|
|
497
|
+
lastStatus?: 'ok' | 'error' | 'skipped' | null;
|
|
485
498
|
lastError?: string | null;
|
|
486
499
|
};
|
|
487
500
|
|
|
@@ -497,7 +510,7 @@ export type CronJobView = {
|
|
|
497
510
|
deleteAfterRun: boolean;
|
|
498
511
|
};
|
|
499
512
|
|
|
500
|
-
export type CronListStatus =
|
|
513
|
+
export type CronListStatus = 'all' | 'enabled' | 'disabled' | 'attention';
|
|
501
514
|
|
|
502
515
|
export type CronListQuery = {
|
|
503
516
|
all?: boolean;
|
|
@@ -549,7 +562,7 @@ export type RuntimeConfigUpdate = {
|
|
|
549
562
|
session?: SessionConfigView;
|
|
550
563
|
};
|
|
551
564
|
|
|
552
|
-
export type SecretSourceView =
|
|
565
|
+
export type SecretSourceView = 'env' | 'file' | 'exec';
|
|
553
566
|
|
|
554
567
|
export type SecretRefView = {
|
|
555
568
|
source: SecretSourceView;
|
|
@@ -558,18 +571,18 @@ export type SecretRefView = {
|
|
|
558
571
|
};
|
|
559
572
|
|
|
560
573
|
export type SecretProviderEnvView = {
|
|
561
|
-
source:
|
|
574
|
+
source: 'env';
|
|
562
575
|
prefix?: string;
|
|
563
576
|
};
|
|
564
577
|
|
|
565
578
|
export type SecretProviderFileView = {
|
|
566
|
-
source:
|
|
579
|
+
source: 'file';
|
|
567
580
|
path: string;
|
|
568
|
-
format?:
|
|
581
|
+
format?: 'json';
|
|
569
582
|
};
|
|
570
583
|
|
|
571
584
|
export type SecretProviderExecView = {
|
|
572
|
-
source:
|
|
585
|
+
source: 'exec';
|
|
573
586
|
command: string;
|
|
574
587
|
args?: string[];
|
|
575
588
|
cwd?: string;
|
|
@@ -650,7 +663,7 @@ export type ProviderTemplateView = {
|
|
|
650
663
|
id: string;
|
|
651
664
|
providerType: string;
|
|
652
665
|
displayName?: string;
|
|
653
|
-
apiProtocol?:
|
|
666
|
+
apiProtocol?: 'openai-compatible' | 'anthropic-messages';
|
|
654
667
|
modelPrefix?: string;
|
|
655
668
|
keywords: string[];
|
|
656
669
|
envKey: string;
|
|
@@ -664,7 +677,7 @@ export type ProviderTemplateView = {
|
|
|
664
677
|
zh?: string;
|
|
665
678
|
};
|
|
666
679
|
auth?: {
|
|
667
|
-
kind:
|
|
680
|
+
kind: 'device_code';
|
|
668
681
|
displayName?: string;
|
|
669
682
|
note?: {
|
|
670
683
|
en?: string;
|
|
@@ -686,13 +699,16 @@ export type ProviderTemplateView = {
|
|
|
686
699
|
};
|
|
687
700
|
defaultModels?: string[];
|
|
688
701
|
supportsModelDiscovery?: boolean;
|
|
689
|
-
modelConfig?: Record<
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
702
|
+
modelConfig?: Record<
|
|
703
|
+
string,
|
|
704
|
+
{
|
|
705
|
+
thinking?: { supported: ThinkingLevel[]; default?: ThinkingLevel | null };
|
|
706
|
+
vision?: boolean;
|
|
707
|
+
}
|
|
708
|
+
>;
|
|
693
709
|
supportsWireApi?: boolean;
|
|
694
|
-
wireApiOptions?: Array<
|
|
695
|
-
defaultWireApi?:
|
|
710
|
+
wireApiOptions?: Array<'auto' | 'chat' | 'responses'>;
|
|
711
|
+
defaultWireApi?: 'auto' | 'chat' | 'responses';
|
|
696
712
|
};
|
|
697
713
|
|
|
698
714
|
export type ProviderTemplatesView = {
|
|
@@ -800,10 +816,23 @@ export type ConfigActionExecuteResult = {
|
|
|
800
816
|
// WebSocket events
|
|
801
817
|
export type WsEvent =
|
|
802
818
|
| { type: 'config.updated'; payload: { path: string } }
|
|
803
|
-
| {
|
|
819
|
+
| {
|
|
820
|
+
type: 'channel.config.apply-status';
|
|
821
|
+
payload: {
|
|
822
|
+
channel: string;
|
|
823
|
+
status: 'started' | 'succeeded' | 'failed';
|
|
824
|
+
message?: string;
|
|
825
|
+
};
|
|
826
|
+
}
|
|
804
827
|
| { type: 'session.updated'; payload: { sessionKey: string } }
|
|
805
|
-
| {
|
|
806
|
-
|
|
828
|
+
| {
|
|
829
|
+
type: 'session.run-status';
|
|
830
|
+
payload: { sessionKey: string; status: 'running' | 'idle' };
|
|
831
|
+
}
|
|
832
|
+
| {
|
|
833
|
+
type: 'session.summary.upsert';
|
|
834
|
+
payload: { summary: NcpSessionSummaryView };
|
|
835
|
+
}
|
|
807
836
|
| { type: 'session.summary.delete'; payload: { sessionKey: string } }
|
|
808
837
|
| { type: 'config.reload.started'; payload?: Record<string, unknown> }
|
|
809
838
|
| { type: 'config.reload.finished'; payload?: Record<string, unknown> }
|
|
@@ -4,6 +4,12 @@ import type {
|
|
|
4
4
|
ServerPathBrowseView,
|
|
5
5
|
ServerPathDirectoryCreateRequest,
|
|
6
6
|
ServerPathDirectoryCreateView,
|
|
7
|
+
ServerPathEntryDeleteView,
|
|
8
|
+
ServerPathEntryRenameRequest,
|
|
9
|
+
ServerPathEntryRenameView,
|
|
10
|
+
ServerPathFileCreateRequest,
|
|
11
|
+
ServerPathFileCreateView,
|
|
12
|
+
ServerPathFilesUploadView,
|
|
7
13
|
ServerPathReadView,
|
|
8
14
|
ServerPathSearchView,
|
|
9
15
|
} from '@/shared/lib/api/types';
|
|
@@ -24,6 +30,30 @@ export async function createServerPathDirectory(
|
|
|
24
30
|
return await nextclawClient.serverPaths.createDirectory(input);
|
|
25
31
|
}
|
|
26
32
|
|
|
33
|
+
export async function createServerPathFile(input: ServerPathFileCreateRequest): Promise<ServerPathFileCreateView> {
|
|
34
|
+
return await nextclawClient.serverPaths.createFile(input);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export async function renameServerPathEntry(input: ServerPathEntryRenameRequest): Promise<ServerPathEntryRenameView> {
|
|
38
|
+
return await nextclawClient.serverPaths.renameEntry(input);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export async function deleteServerPathEntry(params: {
|
|
42
|
+
basePath: string;
|
|
43
|
+
path: string;
|
|
44
|
+
}): Promise<ServerPathEntryDeleteView> {
|
|
45
|
+
return await nextclawClient.serverPaths.deleteEntry(params);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export async function uploadServerPathFiles(params: {
|
|
49
|
+
basePath: string;
|
|
50
|
+
targetPath: string;
|
|
51
|
+
files: readonly File[];
|
|
52
|
+
overwrite?: boolean;
|
|
53
|
+
}): Promise<ServerPathFilesUploadView> {
|
|
54
|
+
return await nextclawClient.serverPaths.uploadFiles(params);
|
|
55
|
+
}
|
|
56
|
+
|
|
27
57
|
export async function fetchServerPathRead(params: {
|
|
28
58
|
path: string;
|
|
29
59
|
basePath?: string | null;
|
|
@@ -41,23 +71,17 @@ export async function fetchServerPathSearch(params: {
|
|
|
41
71
|
}
|
|
42
72
|
|
|
43
73
|
export function buildServerPathContentUrl(path: string): string;
|
|
44
|
-
export function buildServerPathContentUrl(
|
|
45
|
-
|
|
46
|
-
basePath: string | null,
|
|
47
|
-
): string | null;
|
|
48
|
-
export function buildServerPathContentUrl(
|
|
49
|
-
path: string,
|
|
50
|
-
basePath?: string | null,
|
|
51
|
-
): string | null {
|
|
74
|
+
export function buildServerPathContentUrl(path: string, basePath: string | null): string | null;
|
|
75
|
+
export function buildServerPathContentUrl(path: string, basePath?: string | null): string | null {
|
|
52
76
|
const normalizedPath = path.trim();
|
|
53
|
-
const isAbsolute = normalizedPath.startsWith(
|
|
54
|
-
const normalizedBasePath = basePath?.trim() ??
|
|
77
|
+
const isAbsolute = normalizedPath.startsWith('/') || /^[a-z]:[\\/]/i.test(normalizedPath);
|
|
78
|
+
const normalizedBasePath = basePath?.trim() ?? '';
|
|
55
79
|
if (!isAbsolute && !normalizedBasePath) {
|
|
56
80
|
return null;
|
|
57
81
|
}
|
|
58
82
|
const query = new URLSearchParams({ path: normalizedPath });
|
|
59
83
|
if (normalizedBasePath) {
|
|
60
|
-
query.set(
|
|
84
|
+
query.set('basePath', normalizedBasePath);
|
|
61
85
|
}
|
|
62
86
|
return `${API_BASE}${SERVER_PATH_CONTENT_BASE_PATH}?${query.toString()}`;
|
|
63
87
|
}
|
|
@@ -53,11 +53,15 @@
|
|
|
53
53
|
"chatWorkspaceChildSessionsEmpty": "No child sessions yet.",
|
|
54
54
|
"chatWorkspaceSessionCronJobsDescription": "Review scheduled tasks associated with this session.",
|
|
55
55
|
"chatWorkspaceProjectFiles": "Project files",
|
|
56
|
+
"chatWorkspaceShowProjectFiles": "Show project files",
|
|
57
|
+
"chatWorkspaceHideProjectFiles": "Hide project files",
|
|
58
|
+
"chatWorkspaceResizeProjectFiles": "Resize project files",
|
|
56
59
|
"chatWorkspaceProjectFilesDescription": "Browse files from the selected project directory.",
|
|
57
60
|
"chatWorkspaceProjectFilesUnavailable": "Select a project directory to browse its files.",
|
|
58
61
|
"chatWorkspaceSideChatDraftTitle": "Side chat",
|
|
59
62
|
"chatWorkspaceSideChatDraftSubtitle": "This draft will inherit the parent session context when you send the first message.",
|
|
60
63
|
"chatWorkspaceChildSessions": "Child sessions",
|
|
64
|
+
"chatWorkspaceOpen": "Open",
|
|
61
65
|
"chatWorkspaceOpenFiles": "Open files",
|
|
62
66
|
"chatWorkspacePreview": "Preview",
|
|
63
67
|
"chatWorkspaceOpenPreview": "Open preview",
|
|
@@ -74,7 +78,45 @@
|
|
|
74
78
|
"chatWorkspaceDirectoryEmpty": "This directory is empty.",
|
|
75
79
|
"chatWorkspaceDirectoryLoadFailed": "Failed to load directory",
|
|
76
80
|
"chatWorkspaceFileContextMenu": "Project file actions",
|
|
81
|
+
"chatWorkspaceRootContextMenu": "Project root actions",
|
|
77
82
|
"chatWorkspaceAddToChat": "Add to chat",
|
|
83
|
+
"chatWorkspaceMoreActionsFor": "More actions for {name}",
|
|
84
|
+
"chatWorkspaceNewFolder": "New folder",
|
|
85
|
+
"chatWorkspaceNewFile": "New file",
|
|
86
|
+
"chatWorkspaceRefreshExplorer": "Refresh project files",
|
|
87
|
+
"chatWorkspaceCollapseAll": "Collapse all",
|
|
88
|
+
"chatWorkspaceRootMoreActions": "More project file actions",
|
|
89
|
+
"chatWorkspaceFileName": "File name",
|
|
90
|
+
"chatWorkspaceFileNamePlaceholder": "untitled",
|
|
91
|
+
"chatWorkspaceFileCreated": "File created.",
|
|
92
|
+
"chatWorkspaceFileCreateFailed": "Failed to create file",
|
|
93
|
+
"chatWorkspaceCreateFolder": "Create",
|
|
94
|
+
"chatWorkspaceCreateFolderIn": "Create in {name}",
|
|
95
|
+
"chatWorkspaceFolderName": "Folder name",
|
|
96
|
+
"chatWorkspaceFolderNamePlaceholder": "Untitled folder",
|
|
97
|
+
"chatWorkspaceFolderCreated": "Folder created.",
|
|
98
|
+
"chatWorkspaceFolderCreateFailed": "Could not create the folder",
|
|
99
|
+
"chatWorkspaceUploadFiles": "Upload files",
|
|
100
|
+
"chatWorkspaceUploadingFiles": "Uploading…",
|
|
101
|
+
"chatWorkspaceUploadFilesHere": "Upload files here",
|
|
102
|
+
"chatWorkspaceUploadSucceeded": "Uploaded {count} file(s).",
|
|
103
|
+
"chatWorkspaceUploadFailed": "Could not upload the files",
|
|
104
|
+
"chatWorkspaceUploadConflictTitle": "Replace existing files?",
|
|
105
|
+
"chatWorkspaceUploadConflictDescription": "{count} file(s) already exist in this folder. Replacing them cannot be undone.",
|
|
106
|
+
"chatWorkspaceReplaceFiles": "Replace files",
|
|
107
|
+
"chatWorkspaceDownloadFile": "Download",
|
|
108
|
+
"chatWorkspaceDelete": "Delete",
|
|
109
|
+
"chatWorkspaceRename": "Rename",
|
|
110
|
+
"chatWorkspaceRenameSucceeded": "Renamed to {name}.",
|
|
111
|
+
"chatWorkspaceRenameFailed": "Failed to rename",
|
|
112
|
+
"chatWorkspaceRenameName": "New name",
|
|
113
|
+
"chatWorkspaceDeleting": "Deleting {name}…",
|
|
114
|
+
"chatWorkspaceDeleteFileTitle": "Delete {name}?",
|
|
115
|
+
"chatWorkspaceDeleteFolderTitle": "Delete folder {name}?",
|
|
116
|
+
"chatWorkspaceDeleteFileDescription": "This file will be permanently deleted from the project workspace.",
|
|
117
|
+
"chatWorkspaceDeleteFolderDescription": "This folder and everything inside it will be permanently deleted from the project workspace.",
|
|
118
|
+
"chatWorkspaceDeleteSucceeded": "Deleted {name}.",
|
|
119
|
+
"chatWorkspaceDeleteFailed": "Could not delete {name}",
|
|
78
120
|
"chatWorkspaceExcerptSelectionTooLong": "Selection is too long",
|
|
79
121
|
"chatWorkspaceRevealInFileManager": "Reveal in file manager",
|
|
80
122
|
"chatWorkspaceCopyPath": "Copy path",
|
|
@@ -296,8 +338,11 @@
|
|
|
296
338
|
"chatDiscoveredModelsSummary": "{count} new models available",
|
|
297
339
|
"chatDiscoveredModelsView": "View",
|
|
298
340
|
"chatDiscoveredModelsGroup": "New models",
|
|
299
|
-
"chatDiscoveredModelsDismiss": "
|
|
341
|
+
"chatDiscoveredModelsDismiss": "Dismiss this batch",
|
|
342
|
+
"chatDiscoveredModelsDone": "Done",
|
|
343
|
+
"chatDiscoveredModelsClose": "Close new models",
|
|
300
344
|
"chatDiscoveredModelAdd": "Add",
|
|
345
|
+
"chatDiscoveredModelAddedShort": "Added",
|
|
301
346
|
"chatDiscoveredModelAdded": "Added {model}",
|
|
302
347
|
"chatDiscoveredModelUnavailable": "This model is no longer available. Reopen the model selector.",
|
|
303
348
|
"chatPickerAllSkills": "All skills",
|
|
@@ -429,6 +474,9 @@
|
|
|
429
474
|
"chatMermaidExpand": "Expand diagram",
|
|
430
475
|
"chatMermaidLoading": "Rendering diagram…",
|
|
431
476
|
"chatMermaidRenderError": "Diagram could not be rendered; showing source instead",
|
|
477
|
+
"chatPreviewZoomIn": "Zoom in",
|
|
478
|
+
"chatPreviewZoomOut": "Zoom out",
|
|
479
|
+
"chatPreviewResetZoom": "Reset zoom",
|
|
432
480
|
"chatSidebarNewTask": "New Task",
|
|
433
481
|
"chatSidebarSearchPlaceholder": "Search conversations...",
|
|
434
482
|
"chatSidebarScheduledTasks": "Scheduled Tasks",
|