@nextclaw/ui 0.14.1-beta.0 → 0.14.1-beta.1
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 +18 -0
- package/dist/assets/{api-C6EDHBDR.js → api-dQ6uQSZG.js} +3 -3
- package/dist/assets/{channels-list-page-DKj6m1Hc.js → channels-list-page-DfpjB8XB.js} +2 -2
- package/dist/assets/chat-page-D3QaEqjs.js +105 -0
- package/dist/assets/{config-split-page-CjlmJy8X.js → config-split-page-CeFfbaqc.js} +1 -1
- package/dist/assets/{confirm-dialog-B39X0pYp.js → confirm-dialog-C95Y4QPC.js} +1 -1
- package/dist/assets/{desktop-update-config-DfUQ8nly.js → desktop-update-config-CcK6jiEb.js} +1 -1
- package/dist/assets/{dist-CmMro3nV.js → dist-DTGzeil6.js} +1 -1
- package/dist/assets/{dist-BIYV2-Ia.js → dist-fGogBmPA.js} +1 -1
- package/dist/assets/doc-browser-CuBTcBEZ.js +1 -0
- package/dist/assets/{doc-browser-CDtUtcim.js → doc-browser-DVHhEb96.js} +1 -1
- package/dist/assets/{doc-browser-context-DZbC9zVB.js → doc-browser-context-BfMXwnrz.js} +1 -1
- package/dist/assets/{ellipsis-DDpgTzgx.js → ellipsis-D2F4KMiU.js} +1 -1
- package/dist/assets/{external-link-D2cBOCqn.js → external-link-CcgtBK26.js} +1 -1
- package/dist/assets/index-ByJCbQqr.css +1 -0
- package/dist/assets/index-DjXqiloY.js +103 -0
- package/dist/assets/mcp-marketplace-page-98-V__3u.js +1 -0
- package/dist/assets/mcp-marketplace-page-BNq_PNmO.js +40 -0
- package/dist/assets/model-config-page-aAUkZkSX.js +1 -0
- package/dist/assets/plus-1Rxl5FlV.js +1 -0
- package/dist/assets/provider-scoped-model-input-we4_Z4gP.js +1 -0
- package/dist/assets/providers-config-page-CtMkPSyu.js +1 -0
- package/dist/assets/{react-DYQXXGbH.js → react-CTqdhFMk.js} +1 -1
- package/dist/assets/remote-fQ7N_r8u.js +1 -0
- package/dist/assets/rotate-cw-CzfIeAJj.js +1 -0
- package/dist/assets/runtime-config-page-TD1UrTbG.js +1 -0
- package/dist/assets/{save-BNVTgBVn.js → save-C9fKWfVB.js} +1 -1
- package/dist/assets/{search-CKCzwLId.js → search-D5FQ5q0X.js} +1 -1
- package/dist/assets/{search-config-page-DG5Q2hF1.js → search-config-page-AMEJJNIS.js} +1 -1
- package/dist/assets/secrets-config-page-CcgJnvBO.js +3 -0
- package/dist/assets/{select-CIRwTNP4.js → select-Cu5n0E-3.js} +2 -2
- package/dist/assets/{tag-chip-DKhVFtTE.js → tag-chip-C5aOtjxu.js} +1 -1
- package/dist/assets/use-config-D8TESeo6.js +1 -0
- package/dist/assets/x-1qETdQ70.js +1 -0
- package/dist/index.html +14 -14
- package/package.json +9 -9
- package/src/features/chat/components/conversation/__tests__/chat-conversation-panel.test.tsx +12 -63
- package/src/features/chat/components/conversation/chat-conversation-content.tsx +11 -50
- package/src/features/chat/components/conversation/chat-conversation-panel.tsx +15 -2
- package/src/features/chat/features/input/components/chat-input-bar.container.tsx +84 -6
- package/src/features/chat/features/input/hooks/use-chat-input-bar-query-state.ts +2 -0
- package/src/features/chat/features/input/hooks/use-chat-model-favorites.ts +87 -0
- package/src/features/chat/features/input/utils/__tests__/chat-input-bar.utils.test.ts +64 -24
- package/src/features/chat/features/input/utils/__tests__/ncp-chat-input-availability.utils.test.ts +1 -0
- package/src/features/chat/features/input/utils/chat-input-bar.utils.ts +21 -12
- package/src/features/chat/features/input/utils/chat-input-toolbar.utils.ts +80 -25
- package/src/features/chat/features/message/utils/__tests__/chat-message-file-operation.utils.test.ts +310 -0
- package/src/features/chat/features/message/utils/__tests__/chat-message-test.utils.ts +43 -0
- package/src/features/chat/features/message/utils/__tests__/chat-message.utils.test.ts +1 -346
- package/src/features/chat/features/message/utils/chat-message-tool-card.utils.ts +10 -9
- package/src/features/chat/features/message/utils/file-operation/diff.utils.ts +39 -36
- package/src/features/chat/features/message/utils/file-operation/line-builder.utils.ts +46 -38
- package/src/features/chat/features/message/utils/file-operation/parsed-block.utils.ts +18 -15
- package/src/features/chat/features/session/components/session-header/__tests__/chat-session-project-badge.test.tsx +25 -25
- package/src/features/chat/features/session/components/session-header/chat-session-project-badge.tsx +15 -2
- package/src/features/chat/features/session-type/components/__tests__/chat-sidebar-create-menu.test.tsx +24 -0
- package/src/features/chat/features/session-type/components/chat-sidebar-create-menu.tsx +10 -1
- package/src/features/chat/features/welcome/components/__tests__/chat-conversation-welcome.test.tsx +193 -0
- package/src/features/chat/features/welcome/components/__tests__/chat-welcome.test.tsx +123 -0
- package/src/features/chat/features/welcome/components/chat-conversation-welcome.tsx +104 -0
- package/src/features/chat/features/welcome/components/chat-welcome-agent-picker.tsx +72 -0
- package/src/features/chat/features/welcome/components/chat-welcome-capability-grid.tsx +54 -0
- package/src/features/chat/features/welcome/components/chat-welcome-project-picker.tsx +132 -0
- package/src/features/chat/features/welcome/components/chat-welcome-session-type-picker.tsx +82 -0
- package/src/features/chat/features/welcome/components/chat-welcome.tsx +121 -0
- package/src/features/chat/features/welcome/utils/__tests__/chat-welcome-project-options.utils.test.ts +53 -0
- package/src/features/chat/features/welcome/utils/__tests__/chat-welcome-selection.utils.test.ts +63 -0
- package/src/features/chat/features/welcome/utils/__tests__/chat-welcome-visibility.utils.test.ts +34 -0
- package/src/features/chat/features/welcome/utils/chat-welcome-project-options.utils.ts +71 -0
- package/src/features/chat/features/welcome/utils/chat-welcome-selection.utils.ts +79 -0
- package/src/features/chat/features/welcome/utils/chat-welcome-visibility.utils.ts +17 -0
- package/src/features/chat/managers/__tests__/chat-input.manager.test.ts +65 -0
- package/src/features/chat/managers/chat-input.manager.ts +24 -2
- package/src/features/chat/stores/chat-input.store.ts +2 -0
- package/src/features/chat/types/chat-input-bar.types.ts +5 -0
- package/src/features/marketplace/utils/marketplace-installed-cache.utils.ts +27 -23
- package/src/features/settings/components/config/provider-form.tsx +284 -387
- package/src/features/settings/components/config/provider-status-badge.tsx +4 -4
- package/src/features/settings/components/config/secrets-config-form.tsx +11 -135
- package/src/features/settings/hooks/use-provider-auth-flow.ts +140 -0
- package/src/features/settings/pages/__tests__/model-config-page.test.tsx +16 -0
- package/src/features/settings/pages/secrets-config-page.tsx +2 -1
- package/src/features/settings/utils/__tests__/provider-form-support.utils.test.ts +60 -1
- package/src/features/settings/utils/__tests__/secrets-config-form.utils.test.ts +66 -0
- package/src/features/settings/utils/provider-form-context.utils.ts +131 -0
- package/src/features/settings/utils/provider-form-model.utils.ts +101 -0
- package/src/features/settings/utils/provider-form-support.utils.ts +102 -1
- package/src/features/settings/utils/secrets-config-form.utils.ts +139 -0
- package/src/features/system-status/components/config/runtime-agent-list-card.tsx +17 -11
- package/src/features/system-status/components/config/runtime-binding-list-card.tsx +14 -9
- package/src/features/system-status/components/config/runtime-config-editor.tsx +8 -5
- package/src/features/system-status/components/config/runtime-entry-list-card.tsx +14 -9
- package/src/features/system-status/components/config/runtime-settings-card.tsx +16 -7
- package/src/features/system-status/components/runtime-security-card.tsx +79 -25
- package/src/shared/components/common/__tests__/searchable-model-input.test.tsx +34 -0
- package/src/shared/components/common/provider-scoped-model-input.tsx +1 -0
- package/src/shared/components/common/searchable-model-input.tsx +102 -87
- package/src/shared/components/ui/README.md +7 -0
- package/src/shared/components/ui/popover.tsx +19 -3
- package/src/shared/components/ui/select.tsx +14 -4
- package/src/shared/hooks/use-infinite-scroll-loader.ts +14 -10
- package/src/shared/lib/api/index.ts +2 -0
- package/src/shared/lib/api/preferences/preference.types.ts +22 -0
- package/src/shared/lib/api/preferences/preference.utils.ts +40 -0
- package/src/shared/lib/i18n/locales/en-US/chat.json +16 -1
- package/src/shared/lib/i18n/locales/en-US/core.json +1 -0
- package/src/shared/lib/i18n/locales/zh-CN/chat.json +16 -1
- package/src/shared/lib/i18n/locales/zh-CN/core.json +1 -0
- package/dist/assets/chat-page-BXngLJY6.js +0 -105
- package/dist/assets/doc-browser-B6Wc_TIY.js +0 -1
- package/dist/assets/index-DTb_XVIH.js +0 -103
- package/dist/assets/index-ayiPYhf1.css +0 -1
- package/dist/assets/mcp-marketplace-page-DZ9H0v05.js +0 -1
- package/dist/assets/mcp-marketplace-page-cnVWf7QQ.js +0 -40
- package/dist/assets/model-config-page-Bcb35AVv.js +0 -1
- package/dist/assets/plus-CYE1onU2.js +0 -1
- package/dist/assets/provider-scoped-model-input-kdoNp4HG.js +0 -1
- package/dist/assets/providers-config-page-CQSibSwO.js +0 -1
- package/dist/assets/remote-BlJDbXOI.js +0 -1
- package/dist/assets/rotate-cw-BWbvFDAX.js +0 -1
- package/dist/assets/runtime-config-page-Tn2yLQ0c.js +0 -1
- package/dist/assets/secrets-config-page-BXn5Uuwp.js +0 -3
- package/dist/assets/use-config-DgKM9VIU.js +0 -1
- package/dist/assets/x-Cm3JjYut.js +0 -1
- package/src/features/chat/components/__tests__/chat-welcome.test.tsx +0 -45
- package/src/features/chat/components/chat-welcome.tsx +0 -102
|
@@ -16,29 +16,30 @@ function buildInstalledRecordFromInstall(params: {
|
|
|
16
16
|
request: MarketplaceInstallRequest;
|
|
17
17
|
result: MarketplaceInstallResult;
|
|
18
18
|
}): MarketplaceInstalledRecord {
|
|
19
|
+
const { request, result } = params;
|
|
19
20
|
const installedAt = new Date().toISOString();
|
|
20
21
|
|
|
21
|
-
if (
|
|
22
|
+
if (result.type === 'skill') {
|
|
22
23
|
return {
|
|
23
24
|
type: 'skill',
|
|
24
|
-
spec:
|
|
25
|
-
id:
|
|
26
|
-
label:
|
|
25
|
+
spec: result.spec,
|
|
26
|
+
id: request.skill ?? result.spec,
|
|
27
|
+
label: request.skill ?? result.name ?? result.spec,
|
|
27
28
|
source: 'workspace',
|
|
28
|
-
installPath:
|
|
29
|
+
installPath: request.installPath,
|
|
29
30
|
installedAt
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
return {
|
|
34
|
-
type:
|
|
35
|
-
spec:
|
|
36
|
-
id:
|
|
37
|
-
label:
|
|
35
|
+
type: result.type,
|
|
36
|
+
spec: result.spec,
|
|
37
|
+
id: result.name ?? result.spec,
|
|
38
|
+
label: result.name ?? result.spec,
|
|
38
39
|
source: 'marketplace',
|
|
39
40
|
origin: 'marketplace',
|
|
40
|
-
enabled:
|
|
41
|
-
runtimeStatus:
|
|
41
|
+
enabled: request.enabled ?? true,
|
|
42
|
+
runtimeStatus: request.enabled === false ? 'disabled' : 'ready',
|
|
42
43
|
installedAt
|
|
43
44
|
};
|
|
44
45
|
}
|
|
@@ -47,10 +48,11 @@ function matchesInstalledRecord(record: MarketplaceInstalledRecord, params: {
|
|
|
47
48
|
id?: string;
|
|
48
49
|
spec?: string;
|
|
49
50
|
}): boolean {
|
|
50
|
-
|
|
51
|
+
const { id, spec } = params;
|
|
52
|
+
if (spec && record.spec === spec) {
|
|
51
53
|
return true;
|
|
52
54
|
}
|
|
53
|
-
if (
|
|
55
|
+
if (id && record.id === id) {
|
|
54
56
|
return true;
|
|
55
57
|
}
|
|
56
58
|
return false;
|
|
@@ -70,7 +72,8 @@ export function applyInstallResultToInstalledView(params: {
|
|
|
70
72
|
request: MarketplaceInstallRequest;
|
|
71
73
|
result: MarketplaceInstallResult;
|
|
72
74
|
}): MarketplaceInstalledView {
|
|
73
|
-
const
|
|
75
|
+
const { result, view } = params;
|
|
76
|
+
const current = ensureInstalledView(result.type, view);
|
|
74
77
|
const optimisticRecord = buildInstalledRecordFromInstall(params);
|
|
75
78
|
const existingIndex = current.records.findIndex((record) => matchesInstalledRecord(record, {
|
|
76
79
|
id: optimisticRecord.id,
|
|
@@ -89,7 +92,7 @@ export function applyInstallResultToInstalledView(params: {
|
|
|
89
92
|
|
|
90
93
|
return {
|
|
91
94
|
...current,
|
|
92
|
-
type:
|
|
95
|
+
type: result.type,
|
|
93
96
|
records: nextRecords,
|
|
94
97
|
specs: dedupeSpecs(nextRecords),
|
|
95
98
|
total: nextRecords.length
|
|
@@ -101,12 +104,13 @@ export function applyManageResultToInstalledView(params: {
|
|
|
101
104
|
request: MarketplaceManageRequest;
|
|
102
105
|
result: MarketplaceManageResult;
|
|
103
106
|
}): MarketplaceInstalledView {
|
|
104
|
-
const
|
|
107
|
+
const { request, result, view } = params;
|
|
108
|
+
const current = ensureInstalledView(result.type, view);
|
|
105
109
|
|
|
106
|
-
if (
|
|
110
|
+
if (result.action === 'uninstall' || result.action === 'remove') {
|
|
107
111
|
const nextRecords = current.records.filter((record) => !matchesInstalledRecord(record, {
|
|
108
|
-
id:
|
|
109
|
-
spec:
|
|
112
|
+
id: result.id,
|
|
113
|
+
spec: request.spec
|
|
110
114
|
}));
|
|
111
115
|
|
|
112
116
|
return {
|
|
@@ -119,13 +123,13 @@ export function applyManageResultToInstalledView(params: {
|
|
|
119
123
|
|
|
120
124
|
const nextRecords = current.records.map((record) => {
|
|
121
125
|
if (!matchesInstalledRecord(record, {
|
|
122
|
-
id:
|
|
123
|
-
spec:
|
|
126
|
+
id: result.id,
|
|
127
|
+
spec: request.spec
|
|
124
128
|
})) {
|
|
125
129
|
return record;
|
|
126
130
|
}
|
|
127
131
|
|
|
128
|
-
if (
|
|
132
|
+
if (result.action === 'disable') {
|
|
129
133
|
return {
|
|
130
134
|
...record,
|
|
131
135
|
enabled: false,
|
|
@@ -133,7 +137,7 @@ export function applyManageResultToInstalledView(params: {
|
|
|
133
137
|
};
|
|
134
138
|
}
|
|
135
139
|
|
|
136
|
-
if (
|
|
140
|
+
if (result.action === 'update') {
|
|
137
141
|
return {
|
|
138
142
|
...record,
|
|
139
143
|
installedAt: new Date().toISOString(),
|