@qilin-agent/client-ui-settings-models 3.1.3 → 3.1.4
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.i18n.yaml +22 -22
- package/lib/client.js +23 -3
- package/package.json +11 -11
package/README.i18n.yaml
CHANGED
|
@@ -5,57 +5,57 @@
|
|
|
5
5
|
/:
|
|
6
6
|
en: c6e46e2f596d3f0e
|
|
7
7
|
zh: 82a5bd28463975ff
|
|
8
|
-
/qilin-client-ui-settings-models:
|
|
9
|
-
en:
|
|
10
|
-
zh:
|
|
11
|
-
/qilin-client-ui-settings-models/summary:
|
|
8
|
+
/qilin-agent-client-ui-settings-models:
|
|
9
|
+
en: 1c9b41c45b62fd30
|
|
10
|
+
zh: aee079c618aea559
|
|
11
|
+
/qilin-agent-client-ui-settings-models/summary:
|
|
12
12
|
en: 5fb6b042b125f685
|
|
13
13
|
zh: 809e060bfb9cff1a
|
|
14
|
-
/qilin-client-ui-settings-models/table-of-contents:
|
|
14
|
+
/qilin-agent-client-ui-settings-models/table-of-contents:
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 09388d293f9be9cb
|
|
17
|
-
/qilin-client-ui-settings-models/use-this-package:
|
|
17
|
+
/qilin-agent-client-ui-settings-models/use-this-package:
|
|
18
18
|
en: cac50319f379a794
|
|
19
19
|
zh: 5452cb099584cfd7
|
|
20
|
-
/qilin-client-ui-settings-models/use-this-package/api-keys:
|
|
20
|
+
/qilin-agent-client-ui-settings-models/use-this-package/api-keys:
|
|
21
21
|
en: 52dc56789932574f
|
|
22
22
|
zh: e79a8684569ceca8
|
|
23
|
-
/qilin-client-ui-settings-models/use-this-package/editing-a-provider:
|
|
23
|
+
/qilin-agent-client-ui-settings-models/use-this-package/editing-a-provider:
|
|
24
24
|
en: 63243594b46bbf07
|
|
25
25
|
zh: e83c8383ca376de6
|
|
26
|
-
/qilin-client-ui-settings-models/use-this-package/adding-and-deleting-providers:
|
|
26
|
+
/qilin-agent-client-ui-settings-models/use-this-package/adding-and-deleting-providers:
|
|
27
27
|
en: 30c980f905a0245d
|
|
28
28
|
zh: bc119152d4f1a16d
|
|
29
|
-
/qilin-client-ui-settings-models/use-this-package/first-run-dialogs:
|
|
29
|
+
/qilin-agent-client-ui-settings-models/use-this-package/first-run-dialogs:
|
|
30
30
|
en: 589397a35f82244e
|
|
31
31
|
zh: 1528fc78b5d38db3
|
|
32
|
-
/qilin-client-ui-settings-models/use-this-package/extension-slots:
|
|
32
|
+
/qilin-agent-client-ui-settings-models/use-this-package/extension-slots:
|
|
33
33
|
en: 7a755256c3d1b3a1
|
|
34
34
|
zh: 45b1aa9fd44c312e
|
|
35
|
-
/qilin-client-ui-settings-models/understand-the-implementation:
|
|
35
|
+
/qilin-agent-client-ui-settings-models/understand-the-implementation:
|
|
36
36
|
en: a87afbec5e339b36
|
|
37
37
|
zh: 0c06c1a3447e1263
|
|
38
|
-
/qilin-client-ui-settings-models/understand-the-implementation/validation:
|
|
39
|
-
en:
|
|
40
|
-
zh:
|
|
41
|
-
/qilin-client-ui-settings-models/understand-the-implementation/concurrency-and-credentials:
|
|
38
|
+
/qilin-agent-client-ui-settings-models/understand-the-implementation/validation:
|
|
39
|
+
en: 37e55302b95c701f
|
|
40
|
+
zh: cf5621a9bf5c3e88
|
|
41
|
+
/qilin-agent-client-ui-settings-models/understand-the-implementation/concurrency-and-credentials:
|
|
42
42
|
en: dfa69c8f6c7e522e
|
|
43
43
|
zh: ee084759767805b4
|
|
44
|
-
/qilin-client-ui-settings-models/understand-the-implementation/onboarding-coordinator:
|
|
44
|
+
/qilin-agent-client-ui-settings-models/understand-the-implementation/onboarding-coordinator:
|
|
45
45
|
en: 9b6d2ab855c49bd3
|
|
46
46
|
zh: 6fc401f0587d725d
|
|
47
|
-
/qilin-client-ui-settings-models/further-exploration:
|
|
47
|
+
/qilin-agent-client-ui-settings-models/further-exploration:
|
|
48
48
|
en: 79d843a7353898ac
|
|
49
49
|
zh: ba499db1207ea7ac
|
|
50
|
-
/qilin-client-ui-settings-models/model-experience:
|
|
50
|
+
/qilin-agent-client-ui-settings-models/model-experience:
|
|
51
51
|
en: 3120df665299c634
|
|
52
52
|
zh: 1d9f365d091d0d2a
|
|
53
|
-
/qilin-client-ui-settings-models/model-experience/kv-cache-effect:
|
|
53
|
+
/qilin-agent-client-ui-settings-models/model-experience/kv-cache-effect:
|
|
54
54
|
en: ca75c51c89c2c9b0
|
|
55
55
|
zh: de54f3467ef3b9be
|
|
56
|
-
/qilin-client-ui-settings-models/known-limitations-and-deferred-work:
|
|
56
|
+
/qilin-agent-client-ui-settings-models/known-limitations-and-deferred-work:
|
|
57
57
|
en: 7c9e422161e3613d
|
|
58
58
|
zh: e340b8f0a325d9f0
|
|
59
|
-
/qilin-client-ui-settings-models/known-limitations-and-deferred-work/dev-note:
|
|
59
|
+
/qilin-agent-client-ui-settings-models/known-limitations-and-deferred-work/dev-note:
|
|
60
60
|
en: e67f633dc6fe7773
|
|
61
61
|
zh: 3bb0c20c93f16f98
|
package/lib/client.js
CHANGED
|
@@ -1915,6 +1915,10 @@ window.__ModuleLoader__.load({
|
|
|
1915
1915
|
function Loaded({ injected, renderSlot }) {
|
|
1916
1916
|
const { controller, operations, schema, t } = injected;
|
|
1917
1917
|
const state = injected.useSnapshot((snapshot) => snapshot);
|
|
1918
|
+
/** A new or failed surface waits for a current snapshot; background refreshes preserve its drafts. */
|
|
1919
|
+
const [hasReadySnapshot, setHasReadySnapshot] = (0, react.useState)(state.status === "ready");
|
|
1920
|
+
if (state.status === "ready" && !hasReadySnapshot) setHasReadySnapshot(true);
|
|
1921
|
+
if (state.status === "error" && hasReadySnapshot) setHasReadySnapshot(false);
|
|
1918
1922
|
const [editing, setEditing] = (0, react.useState)(void 0);
|
|
1919
1923
|
const [adding, setAdding] = (0, react.useState)(false);
|
|
1920
1924
|
const [deleteTarget, setDeleteTarget] = (0, react.useState)(void 0);
|
|
@@ -1984,6 +1988,16 @@ window.__ModuleLoader__.load({
|
|
|
1984
1988
|
})]
|
|
1985
1989
|
});
|
|
1986
1990
|
}
|
|
1991
|
+
if (!hasReadySnapshot && state.status !== "ready") return (0, react_jsx_runtime.jsxs)("div", {
|
|
1992
|
+
className: ModelsSection_module_css_default["section"],
|
|
1993
|
+
children: [(0, react_jsx_runtime.jsx)("h2", {
|
|
1994
|
+
className: ModelsSection_module_css_default["title"],
|
|
1995
|
+
children: t("title")
|
|
1996
|
+
}), (0, react_jsx_runtime.jsx)("p", {
|
|
1997
|
+
className: ModelsSection_module_css_default["intro"],
|
|
1998
|
+
children: t("intro")
|
|
1999
|
+
})]
|
|
2000
|
+
});
|
|
1987
2001
|
const savedRow = savedTarget === void 0 ? void 0 : state.rows.find((row) => row.entry.provider === savedTarget.provider);
|
|
1988
2002
|
const savedIdentity = savedRow === void 0 ? savedTarget : {
|
|
1989
2003
|
provider: savedRow.entry.provider,
|
|
@@ -2089,7 +2103,9 @@ window.__ModuleLoader__.load({
|
|
|
2089
2103
|
type: "button",
|
|
2090
2104
|
className: ModelsSection_module_css_default["secondaryButton"],
|
|
2091
2105
|
"aria-label": providerCopy(t("editProvider"), target),
|
|
2106
|
+
disabled: !open && state.status !== "ready",
|
|
2092
2107
|
onClick: () => {
|
|
2108
|
+
if (!open && controller.store.getSnapshot().status !== "ready") return;
|
|
2093
2109
|
setSavedTarget(void 0);
|
|
2094
2110
|
setDeclaring(false);
|
|
2095
2111
|
setAdding(false);
|
|
@@ -2100,8 +2116,9 @@ window.__ModuleLoader__.load({
|
|
|
2100
2116
|
type: "button",
|
|
2101
2117
|
className: ModelsSection_module_css_default["dangerButton"],
|
|
2102
2118
|
"aria-label": providerCopy(t("removeProvider"), target),
|
|
2103
|
-
disabled: !state.writable,
|
|
2119
|
+
disabled: !state.writable || state.status !== "ready",
|
|
2104
2120
|
onClick: () => {
|
|
2121
|
+
if (controller.store.getSnapshot().status !== "ready") return;
|
|
2105
2122
|
setSavedTarget(void 0);
|
|
2106
2123
|
setDeleteFailure(void 0);
|
|
2107
2124
|
setDeleteTarget(target);
|
|
@@ -2197,8 +2214,9 @@ window.__ModuleLoader__.load({
|
|
|
2197
2214
|
children: [configurable.length > 0 && (0, react_jsx_runtime.jsxs)("button", {
|
|
2198
2215
|
type: "button",
|
|
2199
2216
|
className: ModelsSection_module_css_default["addButton"],
|
|
2200
|
-
disabled: addable.length === 0 || !state.writable,
|
|
2217
|
+
disabled: addable.length === 0 || !state.writable || state.status !== "ready",
|
|
2201
2218
|
onClick: () => {
|
|
2219
|
+
if (controller.store.getSnapshot().status !== "ready") return;
|
|
2202
2220
|
const first = addable[0];
|
|
2203
2221
|
/* v8 ignore next -- the button is disabled while nothing is addable */
|
|
2204
2222
|
if (first === void 0) return;
|
|
@@ -2211,8 +2229,10 @@ window.__ModuleLoader__.load({
|
|
|
2211
2229
|
}), state.namespaces.has("llm-pi-ai") && (0, react_jsx_runtime.jsxs)("button", {
|
|
2212
2230
|
type: "button",
|
|
2213
2231
|
className: ModelsSection_module_css_default["addButton"],
|
|
2214
|
-
disabled: protocols.length === 0 || !state.writable,
|
|
2232
|
+
disabled: protocols.length === 0 || !state.writable || state.status !== "ready",
|
|
2215
2233
|
onClick: () => {
|
|
2234
|
+
/* v8 ignore next -- the button is disabled unless the schema names protocols; this covers a same-tick click */
|
|
2235
|
+
if (controller.store.getSnapshot().status !== "ready") return;
|
|
2216
2236
|
setSavedTarget(void 0);
|
|
2217
2237
|
setAdding(false);
|
|
2218
2238
|
setEditing(void 0);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/client-ui-settings-models",
|
|
3
3
|
"description": "Models settings and shared product-onboarding dialogs over existing settings and credential joins",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.4",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/react": "~18.3.1",
|
|
47
47
|
"react": "^18.2.0",
|
|
48
|
-
"@qilin-agent/remote-mock": "3.1.
|
|
49
|
-
"@qilin-agent/api-remotes": "3.1.
|
|
50
|
-
"@qilin-agent/client-
|
|
51
|
-
"@qilin-agent/client-test-runtime": "3.1.
|
|
52
|
-
"@qilin-agent/client-
|
|
53
|
-
"@qilin-agent/client-
|
|
54
|
-
"@qilin-agent/client-ui-
|
|
55
|
-
"@qilin-agent/client-ui-
|
|
56
|
-
"@qilin-agent/client-ui-renderer": "3.1.
|
|
48
|
+
"@qilin-agent/remote-mock": "3.1.4",
|
|
49
|
+
"@qilin-agent/api-remotes": "3.1.4",
|
|
50
|
+
"@qilin-agent/client-locale": "3.1.4",
|
|
51
|
+
"@qilin-agent/client-test-runtime": "3.1.4",
|
|
52
|
+
"@qilin-agent/client-store": "3.1.4",
|
|
53
|
+
"@qilin-agent/client-ui-primitives": "3.1.4",
|
|
54
|
+
"@qilin-agent/client-ui-settings": "3.1.4",
|
|
55
|
+
"@qilin-agent/client-ui-slots": "3.1.4",
|
|
56
|
+
"@qilin-agent/client-ui-renderer": "3.1.4",
|
|
57
57
|
"@qilin-agent/kylin": "~4.0.3",
|
|
58
|
-
"@qilin-agent/util-values": "3.1.
|
|
58
|
+
"@qilin-agent/util-values": "3.1.4"
|
|
59
59
|
},
|
|
60
60
|
"files": [
|
|
61
61
|
"lib/index.js",
|