@abpjs/ui 0.2.0-next.1 → 0.2.0-next.3
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 +34 -0
- package/dist/ai.d.ts +112 -24
- package/dist/ai.js +227 -112
- package/dist/ai.js.map +1 -1
- package/dist/index.d.ts +36 -4
- package/dist/index.js +1341 -1097
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/ai.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/areas/ai/pages.tsx
|
|
4
|
-
import { Stack as
|
|
4
|
+
import { Stack as Stack9 } from "@chakra-ui/react";
|
|
5
5
|
import { PageHeader } from "@abpjs/ui";
|
|
6
6
|
|
|
7
7
|
// src/areas/ai/AiAdmin.tsx
|
|
8
8
|
import { useMemo as useMemo4 } from "react";
|
|
9
|
-
import { Stack as
|
|
10
|
-
import {
|
|
9
|
+
import { Stack as Stack8, Tabs } from "@chakra-ui/react";
|
|
10
|
+
import { InlineAlert as InlineAlert6, notify as notify4, Panel as Panel7, useApiAction as useApiAction6, useApiQuery as useApiQuery3, useAreaRequest as useAreaRequest7, useCan } from "@abpjs/ui";
|
|
11
11
|
|
|
12
12
|
// src/areas/ai/AccessPanel.tsx
|
|
13
|
-
import { useEffect, useMemo, useState as useState2 } from "react";
|
|
13
|
+
import { useCallback, useEffect, useMemo, useRef, useState as useState2 } from "react";
|
|
14
14
|
import { Stack as Stack2, Text as Text2 } from "@chakra-ui/react";
|
|
15
15
|
import { Button as Button2, CheckboxField, DataTable, FormDialog, HostSlot, InlineAlert as InlineAlert2, notify, Panel, SearchInput, StatusPill, SwitchField, useApiAction, useApiQuery, useAreaRequest, useFormatters as useFormatters2, useHost, useNames, useOptionalHost, useSlotSaves } from "@abpjs/ui";
|
|
16
16
|
|
|
@@ -177,7 +177,8 @@ var ar_default = {
|
|
|
177
177
|
exportDownload: "\u062A\u0646\u0632\u064A\u0644",
|
|
178
178
|
exportDelete: "\u062D\u0630\u0641",
|
|
179
179
|
exportDeleteTitle: "\u0623\u062A\u062D\u0630\u0641 \u0647\u0630\u0627 \u0627\u0644\u062A\u0635\u062F\u064A\u0631\u061F",
|
|
180
|
-
exportDeleteHint: "\u064A\u064F\u062D\u0630\u0641 \u0645\u0644\u0641\u0647 \u0627\u0644\u0622\u0646\u060C \u0642\u0628\u0644 \u0627\u0646\u0642\u0636\u0627\u0621 \u0623\u0633\u0628\u0648\u0639\u0647."
|
|
180
|
+
exportDeleteHint: "\u064A\u064F\u062D\u0630\u0641 \u0645\u0644\u0641\u0647 \u0627\u0644\u0622\u0646\u060C \u0642\u0628\u0644 \u0627\u0646\u0642\u0636\u0627\u0621 \u0623\u0633\u0628\u0648\u0639\u0647.",
|
|
181
|
+
callThrough: "\u0639\u0628\u0631 {name}"
|
|
181
182
|
};
|
|
182
183
|
|
|
183
184
|
// src/areas/ai/texts/en.json
|
|
@@ -334,7 +335,8 @@ var en_default = {
|
|
|
334
335
|
exportDownload: "Download",
|
|
335
336
|
exportDelete: "Delete",
|
|
336
337
|
exportDeleteTitle: "Delete this export?",
|
|
337
|
-
exportDeleteHint: "Its file goes now, before its week is up."
|
|
338
|
+
exportDeleteHint: "Its file goes now, before its week is up.",
|
|
339
|
+
callThrough: "through {name}"
|
|
338
340
|
};
|
|
339
341
|
|
|
340
342
|
// src/areas/ai/texts.ts
|
|
@@ -420,7 +422,7 @@ function modelRows(connections) {
|
|
|
420
422
|
const price = c.modelPrices?.[model];
|
|
421
423
|
const input = price ? num(price.input) : num(c.inputPrice);
|
|
422
424
|
const output = price ? num(price.output) : num(c.outputPrice);
|
|
423
|
-
const priced =
|
|
425
|
+
const priced = input !== 0 || output !== 0;
|
|
424
426
|
return {
|
|
425
427
|
key: modelKey(c.id, model),
|
|
426
428
|
connectionId: c.id,
|
|
@@ -440,6 +442,31 @@ function modelRows(connections) {
|
|
|
440
442
|
})
|
|
441
443
|
);
|
|
442
444
|
}
|
|
445
|
+
function scopeModelRows(view) {
|
|
446
|
+
return view.models.map((m) => {
|
|
447
|
+
const s = m.settings ?? {};
|
|
448
|
+
const input = num(m.price?.input);
|
|
449
|
+
const output = num(m.price?.output);
|
|
450
|
+
const priced = input !== 0 || output !== 0;
|
|
451
|
+
return {
|
|
452
|
+
key: modelKey(m.connectionId, m.model),
|
|
453
|
+
connectionId: m.connectionId,
|
|
454
|
+
connection: m.connection,
|
|
455
|
+
scopeId: m.setOnScopeId ?? null,
|
|
456
|
+
modelId: m.model,
|
|
457
|
+
name: s.name || m.model,
|
|
458
|
+
enabled: s.enabled ?? true,
|
|
459
|
+
tools: s.tools ?? true,
|
|
460
|
+
images: s.images ?? false,
|
|
461
|
+
structuredOutput: s.structuredOutput ?? false,
|
|
462
|
+
contextTokens: s.contextTokens == null ? null : num(s.contextTokens),
|
|
463
|
+
inputPrice: priced ? input : null,
|
|
464
|
+
outputPrice: priced ? output : null,
|
|
465
|
+
priceSetAt: s.priceSetAt ?? null,
|
|
466
|
+
own: m.own
|
|
467
|
+
};
|
|
468
|
+
});
|
|
469
|
+
}
|
|
443
470
|
function withModel(c, model, settings, price) {
|
|
444
471
|
const modelPrices = { ...c.modelPrices ?? {} };
|
|
445
472
|
if (price) modelPrices[model] = { ...modelPrices[model], input: price.input, output: price.output };
|
|
@@ -464,7 +491,7 @@ function withModel(c, model, settings, price) {
|
|
|
464
491
|
}
|
|
465
492
|
|
|
466
493
|
// src/areas/ai/AccessPanel.tsx
|
|
467
|
-
import {
|
|
494
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
468
495
|
function useAllScopes() {
|
|
469
496
|
const host = useHost();
|
|
470
497
|
const [scopes, setScopes] = useState2(void 0);
|
|
@@ -498,6 +525,8 @@ function AccessPanel({ models }) {
|
|
|
498
525
|
const more = unnamed.map((id) => ({ scopeId: id, name: names[id] ?? id, access: access.get(id) }));
|
|
499
526
|
return [...listed, ...more];
|
|
500
527
|
}, [list.data, scopes, unnamed, names]);
|
|
528
|
+
const { counts, refresh } = useLimitCounts(useMemo(() => (rows ?? []).map((r) => r.scopeId), [rows]));
|
|
529
|
+
const fmt = useFormatters2();
|
|
501
530
|
const needle = search.trim().toLowerCase();
|
|
502
531
|
const shown = rows?.filter((p) => !needle || `${p.name} ${p.code ?? ""}`.toLowerCase().includes(needle));
|
|
503
532
|
const opened = (a) => a?.allSiteModels ? t("allModels") : a?.siteModels.length ? t("someModels", { count: a.siteModels.length }) : t("noModelsOpen");
|
|
@@ -535,12 +564,13 @@ function AccessPanel({ models }) {
|
|
|
535
564
|
},
|
|
536
565
|
{ id: "own", header: t("ownConnections"), cell: (p) => p.access?.mayConnect ? t("allowed") : t("notAllowed") },
|
|
537
566
|
...extraCell ? [{ id: "host", header: t("ownSkills"), cell: (p) => /* @__PURE__ */ jsx2(HostSlot, { name: "ai.access.cell", context: { scopeId: p.scopeId } }) }] : [],
|
|
538
|
-
{ id: "limits", header: t("tabs.limits"), numeric: true, cell: (p) =>
|
|
567
|
+
{ id: "limits", header: t("tabs.limits"), numeric: true, cell: (p) => counts[p.scopeId] === void 0 ? "" : fmt.number(counts[p.scopeId]) },
|
|
539
568
|
{ id: "edit", header: /* @__PURE__ */ jsx2(Text2, { srOnly: true, children: t("edit") }), align: "end", cell: (p) => /* @__PURE__ */ jsx2(Button2, { size: "sm", variant: "ghost", onClick: () => setEditing(p), children: t("edit") }) }
|
|
540
569
|
]
|
|
541
570
|
}
|
|
542
571
|
),
|
|
543
572
|
editing && /* @__PURE__ */ jsx2(AccessEditor, { scope: editing, models, onClose: () => setEditing(null), onSaved: async () => {
|
|
573
|
+
refresh(editing.scopeId);
|
|
544
574
|
setEditing(null);
|
|
545
575
|
await list.reload();
|
|
546
576
|
} })
|
|
@@ -548,10 +578,34 @@ function AccessPanel({ models }) {
|
|
|
548
578
|
}
|
|
549
579
|
);
|
|
550
580
|
}
|
|
551
|
-
function
|
|
552
|
-
const
|
|
553
|
-
const
|
|
554
|
-
|
|
581
|
+
function useLimitCounts(scopeIds) {
|
|
582
|
+
const request = useAreaRequest("ai");
|
|
583
|
+
const asked = useRef(/* @__PURE__ */ new Set());
|
|
584
|
+
const [counts, setCounts] = useState2({});
|
|
585
|
+
const [round, setRound] = useState2(0);
|
|
586
|
+
const key = scopeIds.join(",");
|
|
587
|
+
useEffect(() => {
|
|
588
|
+
const wanted = (key ? key.split(",") : []).filter((id) => !asked.current.has(id));
|
|
589
|
+
wanted.forEach((id) => asked.current.add(id));
|
|
590
|
+
void (async () => {
|
|
591
|
+
for (let i = 0; i < wanted.length; i += 4) {
|
|
592
|
+
const found = await Promise.all(wanted.slice(i, i + 4).map(async (id) => {
|
|
593
|
+
try {
|
|
594
|
+
return [id, (await request(`/limits${scopeQuery(id)}`)).length];
|
|
595
|
+
} catch {
|
|
596
|
+
asked.current.delete(id);
|
|
597
|
+
return null;
|
|
598
|
+
}
|
|
599
|
+
}));
|
|
600
|
+
setCounts((c) => ({ ...c, ...Object.fromEntries(found.filter((f) => f !== null)) }));
|
|
601
|
+
}
|
|
602
|
+
})();
|
|
603
|
+
}, [key, request, round]);
|
|
604
|
+
const refresh = useCallback((scopeId) => {
|
|
605
|
+
asked.current.delete(scopeId);
|
|
606
|
+
setRound((r) => r + 1);
|
|
607
|
+
}, []);
|
|
608
|
+
return { counts, refresh };
|
|
555
609
|
}
|
|
556
610
|
function AccessEditor({ scope, models, onClose, onSaved }) {
|
|
557
611
|
const t = useAiTexts();
|
|
@@ -821,7 +875,7 @@ function ExportsPanel({ scopeId }) {
|
|
|
821
875
|
// src/areas/ai/ModelsPanel.tsx
|
|
822
876
|
import { useState as useState5 } from "react";
|
|
823
877
|
import { HStack as HStack4, Input as Input4, Stack as Stack5, Text as Text5 } from "@chakra-ui/react";
|
|
824
|
-
import { Button as Button5, CheckboxField as CheckboxField2, DataTable as DataTable3, Field as Field4, FormDialog as FormDialog2, HostSlot as HostSlot2, notify as notify3, Panel as Panel4, SelectField as SelectField3, StatusPill as StatusPill2, SwitchField as SwitchField2, errorText as errorText2, useApiAction as useApiAction4, useAreaRequest as useAreaRequest4, useFormatters as useFormatters4 } from "@abpjs/ui";
|
|
878
|
+
import { Button as Button5, CheckboxField as CheckboxField2, DataTable as DataTable3, Field as Field4, FormDialog as FormDialog2, HostSlot as HostSlot2, notify as notify3, Panel as Panel4, SelectField as SelectField3, StatusPill as StatusPill2, SwitchField as SwitchField2, errorText as errorText2, useApiAction as useApiAction4, useAreaRequest as useAreaRequest4, useFormatters as useFormatters4, useOptionalHost as useOptionalHost2 } from "@abpjs/ui";
|
|
825
879
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
826
880
|
function ModelsPanel({ scopeId, connections, rows, loading, hostKeeps, onChanged, title, description }) {
|
|
827
881
|
const t = useAiTexts();
|
|
@@ -834,6 +888,8 @@ function ModelsPanel({ scopeId, connections, rows, loading, hostKeeps, onChanged
|
|
|
834
888
|
const shown = rows ?? (connections ? modelRows(connections) : void 0);
|
|
835
889
|
const source = list.find((c) => c.id === picked) ?? list[0];
|
|
836
890
|
const own = (m) => list.some((c) => c.id === m.connectionId);
|
|
891
|
+
const host = useOptionalHost2();
|
|
892
|
+
const hostSaysCan = hostKeeps && Boolean(host?.slots?.["ai.models.can"]);
|
|
837
893
|
async function discover(c) {
|
|
838
894
|
setFinding(c.id);
|
|
839
895
|
try {
|
|
@@ -893,7 +949,7 @@ function ModelsPanel({ scopeId, connections, rows, loading, hostKeeps, onChanged
|
|
|
893
949
|
{
|
|
894
950
|
id: "can",
|
|
895
951
|
header: t("can"),
|
|
896
|
-
cell: (m) => /* @__PURE__ */ jsxs5(HStack4, { gap: "1", flexWrap: "wrap", children: [
|
|
952
|
+
cell: (m) => hostSaysCan ? /* @__PURE__ */ jsx5(HostSlot2, { name: "ai.models.can", context: { connectionId: m.connectionId, modelId: m.modelId } }) : /* @__PURE__ */ jsxs5(HStack4, { gap: "1", flexWrap: "wrap", children: [
|
|
897
953
|
m.tools && /* @__PURE__ */ jsx5(StatusPill2, { tone: "neutral", dot: false, children: t("tools") }),
|
|
898
954
|
m.images && /* @__PURE__ */ jsx5(StatusPill2, { tone: "neutral", dot: false, children: t("images") }),
|
|
899
955
|
m.structuredOutput && /* @__PURE__ */ jsx5(StatusPill2, { tone: "neutral", dot: false, children: t("structured") })
|
|
@@ -989,22 +1045,62 @@ function ModelEditor({ connection, model, onClose, onSaved }) {
|
|
|
989
1045
|
);
|
|
990
1046
|
}
|
|
991
1047
|
|
|
1048
|
+
// src/areas/ai/TryPanel.tsx
|
|
1049
|
+
import { useId, useState as useState6 } from "react";
|
|
1050
|
+
import { HStack as HStack5, Input as Input5, Stack as Stack6, Text as Text6, Textarea } from "@chakra-ui/react";
|
|
1051
|
+
import { Button as Button6, Field as Field5, InlineAlert as InlineAlert5, Panel as Panel5, useApiAction as useApiAction5, useAreaRequest as useAreaRequest5, useFormatters as useFormatters5 } from "@abpjs/ui";
|
|
1052
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1053
|
+
function TryPanel({ scopeId, aliases }) {
|
|
1054
|
+
const t = useAiTexts();
|
|
1055
|
+
const fmt = useFormatters5();
|
|
1056
|
+
const request = useAreaRequest5("ai");
|
|
1057
|
+
const action = useApiAction5();
|
|
1058
|
+
const [alias, setAlias] = useState6(aliases[0] ?? "");
|
|
1059
|
+
const [prompt, setPrompt] = useState6("");
|
|
1060
|
+
const [result, setResult] = useState6(null);
|
|
1061
|
+
const listId = useId();
|
|
1062
|
+
async function run() {
|
|
1063
|
+
setResult(null);
|
|
1064
|
+
const body = { alias: alias.trim(), prompt, scopeId: scopeId ?? null };
|
|
1065
|
+
const answer = await action.run(() => request("/try", { method: "POST", body }));
|
|
1066
|
+
if (answer) setResult(answer);
|
|
1067
|
+
}
|
|
1068
|
+
return /* @__PURE__ */ jsx6(Panel5, { title: t("tryTitle"), description: t("tryHint"), "data-testid": "ai-try", children: /* @__PURE__ */ jsxs6(Stack6, { gap: "field", children: [
|
|
1069
|
+
/* @__PURE__ */ jsxs6(Field5, { label: t("alias"), children: [
|
|
1070
|
+
/* @__PURE__ */ jsx6(Input5, { value: alias, dir: "ltr", list: listId, onChange: (e) => setAlias(e.target.value) }),
|
|
1071
|
+
/* @__PURE__ */ jsx6("datalist", { id: listId, children: aliases.map((a) => /* @__PURE__ */ jsx6("option", { value: a }, a)) })
|
|
1072
|
+
] }),
|
|
1073
|
+
/* @__PURE__ */ jsx6(Field5, { label: t("prompt"), children: /* @__PURE__ */ jsx6(Textarea, { value: prompt, rows: 3, onChange: (e) => setPrompt(e.target.value) }) }),
|
|
1074
|
+
/* @__PURE__ */ jsx6(HStack5, { children: /* @__PURE__ */ jsx6(Button6, { onClick: () => void run(), loading: action.busy, disabled: !alias.trim() || !prompt.trim(), children: t("run") }) }),
|
|
1075
|
+
/* @__PURE__ */ jsx6(InlineAlert5, { tone: "danger", children: action.error }),
|
|
1076
|
+
result && /* @__PURE__ */ jsxs6(Stack6, { gap: "1", "data-testid": "ai-try-answer", children: [
|
|
1077
|
+
/* @__PURE__ */ jsx6(Text6, { whiteSpace: "pre-wrap", dir: "auto", children: result.text }),
|
|
1078
|
+
/* @__PURE__ */ jsx6(Text6, { textStyle: "caption", color: "fg.muted", children: t("answered", {
|
|
1079
|
+
model: result.model,
|
|
1080
|
+
input: fmt.number(num(result.usage.inputTokens)),
|
|
1081
|
+
output: fmt.number(num(result.usage.outputTokens)),
|
|
1082
|
+
cost: fmt.number(num(result.usage.cost), { maximumFractionDigits: 6 })
|
|
1083
|
+
}) })
|
|
1084
|
+
] })
|
|
1085
|
+
] }) });
|
|
1086
|
+
}
|
|
1087
|
+
|
|
992
1088
|
// src/areas/ai/UsagePanel.tsx
|
|
993
|
-
import { useMemo as useMemo3, useState as
|
|
994
|
-
import { HStack as
|
|
995
|
-
import { DataTable as DataTable4, EMPTY_VALUE, Panel as
|
|
1089
|
+
import { useMemo as useMemo3, useState as useState8 } from "react";
|
|
1090
|
+
import { HStack as HStack6, Stack as Stack7, Text as Text7 } from "@chakra-ui/react";
|
|
1091
|
+
import { DataTable as DataTable4, EMPTY_VALUE, Panel as Panel6, SelectField as SelectField4, StatusPill as StatusPill3, useFormatters as useFormatters6, useNames as useNames2 } from "@abpjs/ui";
|
|
996
1092
|
|
|
997
1093
|
// src/areas/ai/usePostQuery.ts
|
|
998
|
-
import { useCallback, useEffect as useEffect2, useRef, useState as
|
|
999
|
-
import { errorText as errorText3, useAreaRequest as
|
|
1094
|
+
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState7 } from "react";
|
|
1095
|
+
import { errorText as errorText3, useAreaRequest as useAreaRequest6 } from "@abpjs/ui";
|
|
1000
1096
|
function usePostQuery(path, body) {
|
|
1001
|
-
const request =
|
|
1097
|
+
const request = useAreaRequest6("ai");
|
|
1002
1098
|
const key = JSON.stringify(body);
|
|
1003
|
-
const [data, setData] =
|
|
1004
|
-
const [error, setError] =
|
|
1005
|
-
const [loading, setLoading] =
|
|
1006
|
-
const seq =
|
|
1007
|
-
const reload =
|
|
1099
|
+
const [data, setData] = useState7(void 0);
|
|
1100
|
+
const [error, setError] = useState7(null);
|
|
1101
|
+
const [loading, setLoading] = useState7(true);
|
|
1102
|
+
const seq = useRef2(0);
|
|
1103
|
+
const reload = useCallback2(async () => {
|
|
1008
1104
|
const id = ++seq.current;
|
|
1009
1105
|
setLoading(true);
|
|
1010
1106
|
try {
|
|
@@ -1026,7 +1122,7 @@ function usePostQuery(path, body) {
|
|
|
1026
1122
|
}
|
|
1027
1123
|
|
|
1028
1124
|
// src/areas/ai/UsagePanel.tsx
|
|
1029
|
-
import { jsx as
|
|
1125
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1030
1126
|
var USAGE_BY = { project: "scope", model: "model", purpose: "purpose", account: "account" };
|
|
1031
1127
|
var outcomeOf = (state) => state === "done" ? "ok" : state;
|
|
1032
1128
|
var OUTCOME_TONES = { ok: "success", refused: "warning", failed: "danger", reserved: "info" };
|
|
@@ -1038,32 +1134,36 @@ function monthRange(offset) {
|
|
|
1038
1134
|
}
|
|
1039
1135
|
function UsagePanel({ scopeId, by: byOptions }) {
|
|
1040
1136
|
const t = useAiTexts();
|
|
1041
|
-
const fmt =
|
|
1042
|
-
const [by, setBy] =
|
|
1043
|
-
const [month, setMonth] =
|
|
1137
|
+
const fmt = useFormatters6();
|
|
1138
|
+
const [by, setBy] = useState8(byOptions[0]);
|
|
1139
|
+
const [month, setMonth] = useState8(0);
|
|
1044
1140
|
const { from, to } = monthRange(month);
|
|
1045
1141
|
const usage = usePostQuery("/usage", { from, to, scopeId: scopeId ?? null, groupBy: USAGE_BY[by] });
|
|
1046
1142
|
const recent = usePostQuery("/usage/recent", { from, to, scopeId: scopeId ?? null, count: 50 });
|
|
1047
1143
|
const rows = usage.data?.rows;
|
|
1048
1144
|
const people = useNames2("people", useMemo3(() => [
|
|
1049
1145
|
...by === "account" ? (rows ?? []).filter((r) => !r.title && r.key).map((r) => r.key) : [],
|
|
1050
|
-
...(recent.data ?? []).flatMap((c) =>
|
|
1146
|
+
...(recent.data ?? []).flatMap((c) => [
|
|
1147
|
+
...c.accountId && !c.accountName ? [c.accountId] : [],
|
|
1148
|
+
...c.onBehalfOf && !c.onBehalfOfName ? [c.onBehalfOf] : []
|
|
1149
|
+
])
|
|
1051
1150
|
], [by, rows, recent.data]));
|
|
1151
|
+
const nameOf = (id, name) => name || (id ? people[id] : void 0) || id || EMPTY_VALUE;
|
|
1052
1152
|
const scopes = useNames2("scopes", useMemo3(() => by === "project" ? (rows ?? []).filter((r) => !r.title && r.key).map((r) => r.key) : [], [by, rows]));
|
|
1053
1153
|
const months = [0, 1, 2, 3, 4, 5].map((m) => ({ value: String(m), label: fmt.dateTime(monthRange(m).from, { year: "numeric", month: "long", timeZone: "UTC" }) }));
|
|
1054
1154
|
const total = (rows ?? []).reduce((sum, r) => sum + num(r.cost), 0);
|
|
1055
1155
|
const money = (v) => fmt.number(num(v), { maximumFractionDigits: 6 });
|
|
1056
1156
|
const label = (key, title) => key === "" && by === "project" ? t("siteCalls") : title || (by === "account" ? people[key] : by === "project" ? scopes[key] : void 0) || key;
|
|
1057
|
-
return /* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1059
|
-
|
|
1157
|
+
return /* @__PURE__ */ jsxs7(Stack7, { gap: "section", children: [
|
|
1158
|
+
/* @__PURE__ */ jsx7(
|
|
1159
|
+
Panel6,
|
|
1060
1160
|
{
|
|
1061
1161
|
title: t("usageTitle"),
|
|
1062
1162
|
description: t("usageTotal", { cost: money(total) }),
|
|
1063
1163
|
flush: true,
|
|
1064
1164
|
"data-testid": "ai-usage",
|
|
1065
|
-
actions: /* @__PURE__ */
|
|
1066
|
-
/* @__PURE__ */
|
|
1165
|
+
actions: /* @__PURE__ */ jsxs7(HStack6, { gap: "2", children: [
|
|
1166
|
+
/* @__PURE__ */ jsx7(
|
|
1067
1167
|
SelectField4,
|
|
1068
1168
|
{
|
|
1069
1169
|
size: "sm",
|
|
@@ -1074,9 +1174,9 @@ function UsagePanel({ scopeId, by: byOptions }) {
|
|
|
1074
1174
|
onChange: (e) => setBy(e.target.value)
|
|
1075
1175
|
}
|
|
1076
1176
|
),
|
|
1077
|
-
/* @__PURE__ */
|
|
1177
|
+
/* @__PURE__ */ jsx7(SelectField4, { size: "sm", width: "auto", value: String(month), "aria-label": t("month"), options: months, onChange: (e) => setMonth(Number(e.target.value)) })
|
|
1078
1178
|
] }),
|
|
1079
|
-
children: /* @__PURE__ */
|
|
1179
|
+
children: /* @__PURE__ */ jsx7(
|
|
1080
1180
|
DataTable4,
|
|
1081
1181
|
{
|
|
1082
1182
|
"aria-label": t("usageTitle"),
|
|
@@ -1086,7 +1186,7 @@ function UsagePanel({ scopeId, by: byOptions }) {
|
|
|
1086
1186
|
getRowId: (r) => r.key,
|
|
1087
1187
|
empty: t("noUsage"),
|
|
1088
1188
|
columns: [
|
|
1089
|
-
{ id: "label", header: t(`byOptions.${by}`), cell: (r) => /* @__PURE__ */
|
|
1189
|
+
{ id: "label", header: t(`byOptions.${by}`), cell: (r) => /* @__PURE__ */ jsx7(Text7, { dir: "auto", children: label(r.key, r.title) }) },
|
|
1090
1190
|
{ id: "calls", header: t("calls"), numeric: true, cell: (r) => fmt.number(num(r.calls)) },
|
|
1091
1191
|
{ id: "in", header: t("tokensIn"), numeric: true, cell: (r) => fmt.number(num(r.inputTokens)) },
|
|
1092
1192
|
{ id: "out", header: t("tokensOut"), numeric: true, cell: (r) => fmt.number(num(r.outputTokens)) },
|
|
@@ -1098,7 +1198,7 @@ function UsagePanel({ scopeId, by: byOptions }) {
|
|
|
1098
1198
|
)
|
|
1099
1199
|
}
|
|
1100
1200
|
),
|
|
1101
|
-
/* @__PURE__ */
|
|
1201
|
+
/* @__PURE__ */ jsx7(Panel6, { title: t("recentTitle"), flush: true, "data-testid": "ai-recent", children: /* @__PURE__ */ jsx7(
|
|
1102
1202
|
DataTable4,
|
|
1103
1203
|
{
|
|
1104
1204
|
"aria-label": t("recentTitle"),
|
|
@@ -1112,21 +1212,23 @@ function UsagePanel({ scopeId, by: byOptions }) {
|
|
|
1112
1212
|
{
|
|
1113
1213
|
id: "who",
|
|
1114
1214
|
header: t("who"),
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1215
|
+
// An agent's call is the person's it acted for, the agent beside it.
|
|
1216
|
+
cell: (u) => /* @__PURE__ */ jsxs7(Stack7, { gap: "0", children: [
|
|
1217
|
+
/* @__PURE__ */ jsx7(Text7, { children: u.onBehalfOf ? nameOf(u.onBehalfOf, u.onBehalfOfName) : nameOf(u.accountId, u.accountName) }),
|
|
1218
|
+
u.onBehalfOf && /* @__PURE__ */ jsx7(Text7, { textStyle: "caption", color: "fg.muted", children: t("callThrough", { name: nameOf(u.accountId, u.accountName) }) }),
|
|
1219
|
+
u.scope && /* @__PURE__ */ jsx7(Text7, { textStyle: "caption", color: "fg.muted", dir: "ltr", children: u.scope })
|
|
1118
1220
|
] })
|
|
1119
1221
|
},
|
|
1120
|
-
{ id: "purpose", header: t("purpose"), cell: (u) => /* @__PURE__ */
|
|
1121
|
-
{ id: "model", header: t("model"), cell: (u) => /* @__PURE__ */
|
|
1222
|
+
{ id: "purpose", header: t("purpose"), cell: (u) => /* @__PURE__ */ jsx7(Text7, { fontFamily: "mono", textStyle: "sm", dir: "ltr", children: u.purpose || EMPTY_VALUE }) },
|
|
1223
|
+
{ id: "model", header: t("model"), cell: (u) => /* @__PURE__ */ jsx7(Text7, { fontFamily: "mono", textStyle: "sm", dir: "ltr", children: u.model }) },
|
|
1122
1224
|
{ id: "tokens", header: t("tokens"), numeric: true, cell: (u) => `${fmt.number(num(u.inputTokens))} / ${fmt.number(num(u.outputTokens))}` },
|
|
1123
1225
|
{ id: "cost", header: t("cost"), numeric: true, cell: (u) => money(u.cost) },
|
|
1124
1226
|
{
|
|
1125
1227
|
id: "outcome",
|
|
1126
1228
|
header: t("outcome"),
|
|
1127
|
-
cell: (u) => /* @__PURE__ */
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
u.error && /* @__PURE__ */
|
|
1229
|
+
cell: (u) => /* @__PURE__ */ jsxs7(Stack7, { gap: "0.5", children: [
|
|
1230
|
+
/* @__PURE__ */ jsx7(StatusPill3, { tone: OUTCOME_TONES[outcomeOf(u.state)] ?? "neutral", children: t(`outcomes.${outcomeOf(u.state)}`) }),
|
|
1231
|
+
u.error && /* @__PURE__ */ jsx7(Text7, { textStyle: "caption", color: "fg.muted", lineClamp: 2, title: u.error, children: u.error })
|
|
1130
1232
|
] })
|
|
1131
1233
|
}
|
|
1132
1234
|
]
|
|
@@ -1136,22 +1238,20 @@ function UsagePanel({ scopeId, by: byOptions }) {
|
|
|
1136
1238
|
}
|
|
1137
1239
|
|
|
1138
1240
|
// src/areas/ai/AiAdmin.tsx
|
|
1139
|
-
import { jsx as
|
|
1140
|
-
function useHostKeepsConnections(
|
|
1241
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1242
|
+
function useHostKeepsConnections(told, scopeId) {
|
|
1141
1243
|
const can = useCan();
|
|
1142
|
-
const told = site?.connectionsKeptByHost;
|
|
1143
1244
|
return told ?? !can("ai.connections.edit", scopeId);
|
|
1144
1245
|
}
|
|
1145
1246
|
function AiAdmin() {
|
|
1146
1247
|
const t = useAiTexts();
|
|
1147
|
-
const request =
|
|
1248
|
+
const request = useAreaRequest7("ai");
|
|
1148
1249
|
const site = useApiQuery3("ai", "/site");
|
|
1149
1250
|
const connections = useApiQuery3("ai", "/connections");
|
|
1150
1251
|
const aliases = useApiQuery3("ai", "/aliases");
|
|
1151
1252
|
const limits = useApiQuery3("ai", "/limits");
|
|
1152
|
-
const saving =
|
|
1153
|
-
const hostKeeps = useHostKeepsConnections(site.data);
|
|
1154
|
-
const tryHere = Boolean(useOptionalHost2()?.slots?.["ai.try"]);
|
|
1253
|
+
const saving = useApiAction6();
|
|
1254
|
+
const hostKeeps = useHostKeepsConnections(site.data?.connectionsKeptByHost);
|
|
1155
1255
|
const models = useMemo4(() => modelRows(connections.data ?? []), [connections.data]);
|
|
1156
1256
|
async function saveSiteLimits(rows) {
|
|
1157
1257
|
if (await saving.run(() => saveLimits(request, null, limits.data ?? [], rows).then(() => true)) !== void 0) {
|
|
@@ -1159,20 +1259,20 @@ function AiAdmin() {
|
|
|
1159
1259
|
await limits.reload();
|
|
1160
1260
|
}
|
|
1161
1261
|
}
|
|
1162
|
-
return /* @__PURE__ */
|
|
1163
|
-
/* @__PURE__ */
|
|
1164
|
-
/* @__PURE__ */
|
|
1165
|
-
/* @__PURE__ */
|
|
1166
|
-
/* @__PURE__ */
|
|
1167
|
-
/* @__PURE__ */
|
|
1168
|
-
/* @__PURE__ */
|
|
1169
|
-
|
|
1170
|
-
/* @__PURE__ */
|
|
1262
|
+
return /* @__PURE__ */ jsxs8(Tabs.Root, { defaultValue: "models", variant: "line", lazyMount: true, children: [
|
|
1263
|
+
/* @__PURE__ */ jsxs8(Tabs.List, { mb: "section", overflowX: "auto", overflowY: "hidden", children: [
|
|
1264
|
+
/* @__PURE__ */ jsx8(Tabs.Trigger, { value: "models", children: t("tabs.models") }),
|
|
1265
|
+
/* @__PURE__ */ jsx8(Tabs.Trigger, { value: "aliases", children: t("tabs.aliases") }),
|
|
1266
|
+
/* @__PURE__ */ jsx8(Tabs.Trigger, { value: "access", children: t("tabs.access") }),
|
|
1267
|
+
/* @__PURE__ */ jsx8(Tabs.Trigger, { value: "limits", children: t("tabs.limits") }),
|
|
1268
|
+
/* @__PURE__ */ jsx8(Tabs.Trigger, { value: "usage", children: t("tabs.usage") }),
|
|
1269
|
+
/* @__PURE__ */ jsx8(Tabs.Trigger, { value: "try", children: t("tabs.try") }),
|
|
1270
|
+
/* @__PURE__ */ jsx8(Tabs.Trigger, { value: "exports", children: t("tabs.exports") })
|
|
1171
1271
|
] }),
|
|
1172
|
-
/* @__PURE__ */
|
|
1173
|
-
/* @__PURE__ */
|
|
1174
|
-
connections.data && connections.data.length === 0 && /* @__PURE__ */
|
|
1175
|
-
/* @__PURE__ */
|
|
1272
|
+
/* @__PURE__ */ jsx8(Tabs.Content, { value: "models", children: /* @__PURE__ */ jsxs8(Stack8, { gap: "section", children: [
|
|
1273
|
+
/* @__PURE__ */ jsx8(InlineAlert6, { tone: "danger", children: connections.error }),
|
|
1274
|
+
connections.data && connections.data.length === 0 && /* @__PURE__ */ jsx8(InlineAlert6, { tone: "info", children: t("noProviders") }),
|
|
1275
|
+
/* @__PURE__ */ jsx8(
|
|
1176
1276
|
ModelsPanel,
|
|
1177
1277
|
{
|
|
1178
1278
|
connections: connections.data,
|
|
@@ -1184,22 +1284,22 @@ function AiAdmin() {
|
|
|
1184
1284
|
}
|
|
1185
1285
|
)
|
|
1186
1286
|
] }) }),
|
|
1187
|
-
/* @__PURE__ */
|
|
1188
|
-
/* @__PURE__ */
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
|
|
1192
|
-
/* @__PURE__ */
|
|
1287
|
+
/* @__PURE__ */ jsx8(Tabs.Content, { value: "aliases", children: /* @__PURE__ */ jsx8(AliasesPanel, { aliases: aliases.data, models, onSaved: aliases.reload }) }),
|
|
1288
|
+
/* @__PURE__ */ jsx8(Tabs.Content, { value: "access", children: /* @__PURE__ */ jsx8(AccessPanel, { models }) }),
|
|
1289
|
+
/* @__PURE__ */ jsx8(Tabs.Content, { value: "limits", children: /* @__PURE__ */ jsx8(Panel7, { title: t("siteLimitsTitle"), description: t("siteLimitsHint"), children: limits.data && /* @__PURE__ */ jsx8(LimitsEditor, { limits: limits.data, onSave: saveSiteLimits, busy: saving.busy, error: saving.error ?? limits.error }) }) }),
|
|
1290
|
+
/* @__PURE__ */ jsx8(Tabs.Content, { value: "usage", children: /* @__PURE__ */ jsx8(UsagePanel, { by: ["project", "model", "purpose", "account"] }) }),
|
|
1291
|
+
/* @__PURE__ */ jsx8(Tabs.Content, { value: "try", children: /* @__PURE__ */ jsx8(TryPanel, { aliases: (aliases.data ?? []).map((a) => a.name) }) }),
|
|
1292
|
+
/* @__PURE__ */ jsx8(Tabs.Content, { value: "exports", children: /* @__PURE__ */ jsx8(ExportsPanel, {}) })
|
|
1193
1293
|
] });
|
|
1194
1294
|
}
|
|
1195
1295
|
|
|
1196
1296
|
// src/areas/ai/pages.tsx
|
|
1197
|
-
import { jsx as
|
|
1297
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1198
1298
|
function AiAdminPage() {
|
|
1199
1299
|
const t = useAiTexts();
|
|
1200
|
-
return /* @__PURE__ */
|
|
1201
|
-
/* @__PURE__ */
|
|
1202
|
-
/* @__PURE__ */
|
|
1300
|
+
return /* @__PURE__ */ jsxs9(Stack9, { gap: "section", children: [
|
|
1301
|
+
/* @__PURE__ */ jsx9(PageHeader, { title: t("pageTitle"), description: t("pageSubtitle") }),
|
|
1302
|
+
/* @__PURE__ */ jsx9(AiAdmin, {})
|
|
1203
1303
|
] });
|
|
1204
1304
|
}
|
|
1205
1305
|
function aiPages(options) {
|
|
@@ -1220,59 +1320,72 @@ function aiPages(options) {
|
|
|
1220
1320
|
|
|
1221
1321
|
// src/areas/ai/AiScopeScreen.tsx
|
|
1222
1322
|
import { useMemo as useMemo5 } from "react";
|
|
1223
|
-
import { Stack as
|
|
1224
|
-
import {
|
|
1225
|
-
import { jsx as
|
|
1323
|
+
import { Stack as Stack10, Text as Text8 } from "@chakra-ui/react";
|
|
1324
|
+
import { InlineAlert as InlineAlert7, Loading, Panel as Panel8, StatusPill as StatusPill4, TextBone, TextSlot, useApiQuery as useApiQuery4, useNames as useNames3 } from "@abpjs/ui";
|
|
1325
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1226
1326
|
function AiScopeScreen({ scopeId }) {
|
|
1227
1327
|
const t = useAiTexts();
|
|
1228
1328
|
const limitText = useLimitText();
|
|
1229
|
-
const
|
|
1230
|
-
const
|
|
1231
|
-
const
|
|
1329
|
+
const id = encodeURIComponent(scopeId);
|
|
1330
|
+
const view = useApiQuery4("ai", `/scopes/${id}/view`);
|
|
1331
|
+
const access = useApiQuery4("ai", `/scopes/${id}/access`);
|
|
1332
|
+
const v = view.data;
|
|
1333
|
+
const own = useApiQuery4("ai", v?.mayConnect ? `/connections${scopeQuery(scopeId)}` : null);
|
|
1232
1334
|
const aliases = useApiQuery4("ai", `/aliases${scopeQuery(scopeId)}`);
|
|
1233
1335
|
const limits = useApiQuery4("ai", `/limits${scopeQuery(scopeId)}`);
|
|
1234
|
-
const
|
|
1235
|
-
const
|
|
1336
|
+
const hostKeeps = useHostKeepsConnections(v?.connectionsKeptByHost, scopeId);
|
|
1337
|
+
const rows = useMemo5(() => v ? scopeModelRows(v) : void 0, [v]);
|
|
1236
1338
|
const a = access.data;
|
|
1237
|
-
const
|
|
1238
|
-
const
|
|
1239
|
-
const
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1339
|
+
const above = useMemo5(() => {
|
|
1340
|
+
const groups = [];
|
|
1341
|
+
for (const l of v?.limitsFromAbove ?? []) {
|
|
1342
|
+
const at = l.scopeId ?? null;
|
|
1343
|
+
const group = groups.find((g) => g.scopeId === at);
|
|
1344
|
+
if (group) group.limits.push(l);
|
|
1345
|
+
else groups.push({ scopeId: at, limits: [l] });
|
|
1346
|
+
}
|
|
1347
|
+
return groups;
|
|
1348
|
+
}, [v]);
|
|
1349
|
+
const scopeNames = useNames3("scopes", useMemo5(() => above.flatMap((g) => g.scopeId ? [g.scopeId] : []), [above]));
|
|
1350
|
+
const aliasNames = useMemo5(() => [...new Set([...aliases.data ?? [], ...v?.aliasesFromAbove ?? []].map((x) => x.name))], [aliases.data, v]);
|
|
1351
|
+
if (view.error && !v || access.error && !a) return /* @__PURE__ */ jsx10(InlineAlert7, { tone: "danger", children: view.error ?? access.error });
|
|
1243
1352
|
const opened = a && (a.allSiteModels ? t("allModels") : a.siteModels.length ? t("someModels", { count: a.siteModels.length }) : t("noModelsOpen"));
|
|
1244
|
-
const lines = (list) => !list ? /* @__PURE__ */
|
|
1245
|
-
return /* @__PURE__ */
|
|
1246
|
-
/* @__PURE__ */
|
|
1247
|
-
/* @__PURE__ */
|
|
1248
|
-
/* @__PURE__ */
|
|
1353
|
+
const lines = (list) => !list ? /* @__PURE__ */ jsx10(Text8, { textStyle: "sm", children: /* @__PURE__ */ jsx10(TextBone, { width: 24 }) }) : list.length ? list.map((l) => /* @__PURE__ */ jsx10(Text8, { textStyle: "sm", children: limitText(l) }, l.id)) : /* @__PURE__ */ jsx10(Text8, { textStyle: "sm", color: "fg.muted", children: t("noLimits") });
|
|
1354
|
+
return /* @__PURE__ */ jsx10(Loading, { when: !v || !a, children: /* @__PURE__ */ jsxs10(Stack10, { gap: "section", children: [
|
|
1355
|
+
/* @__PURE__ */ jsx10(Panel8, { title: t("projectAccessTitle"), description: t("projectAccessHint"), "data-testid": "ai-project-access", children: /* @__PURE__ */ jsxs10(Stack10, { gap: "2", children: [
|
|
1356
|
+
/* @__PURE__ */ jsx10(Text8, { children: /* @__PURE__ */ jsx10(StatusPill4, { tone: a?.allSiteModels || a?.siteModels.length ? "success" : "neutral", children: opened }) }),
|
|
1357
|
+
/* @__PURE__ */ jsx10(Text8, { textStyle: "sm", children: /* @__PURE__ */ jsx10(TextSlot, { width: 44, children: v && (v.mayConnect ? t("ownAllowed") : t("ownNotAllowed")) }) })
|
|
1249
1358
|
] }) }),
|
|
1250
|
-
/* @__PURE__ */
|
|
1359
|
+
/* @__PURE__ */ jsx10(
|
|
1251
1360
|
ModelsPanel,
|
|
1252
1361
|
{
|
|
1253
1362
|
scopeId,
|
|
1254
|
-
connections:
|
|
1363
|
+
connections: v?.mayConnect ? own.data ?? [] : [],
|
|
1255
1364
|
rows,
|
|
1256
|
-
loading:
|
|
1365
|
+
loading: view.loading,
|
|
1257
1366
|
hostKeeps,
|
|
1258
|
-
onChanged: () => Promise.all([own.reload(), aliases.reload()]).then(() => void 0),
|
|
1367
|
+
onChanged: () => Promise.all([view.reload(), own.reload(), aliases.reload()]).then(() => void 0),
|
|
1259
1368
|
title: t("projectModelsTitle"),
|
|
1260
|
-
description:
|
|
1369
|
+
description: v?.mayConnect ? t("projectModelsOwnHint") : t("projectModelsHint")
|
|
1261
1370
|
}
|
|
1262
1371
|
),
|
|
1263
|
-
/* @__PURE__ */
|
|
1264
|
-
/* @__PURE__ */
|
|
1265
|
-
/* @__PURE__ */
|
|
1266
|
-
/* @__PURE__ */
|
|
1372
|
+
/* @__PURE__ */ jsx10(AliasesPanel, { scopeId, aliases: aliases.data, inherited: v?.aliasesFromAbove, models: rows ?? [], onSaved: aliases.reload }),
|
|
1373
|
+
/* @__PURE__ */ jsx10(Panel8, { title: t("tabs.limits"), description: t("projectLimitsReadHint"), "data-testid": "ai-project-limits", children: /* @__PURE__ */ jsxs10(Stack10, { gap: "3", children: [
|
|
1374
|
+
/* @__PURE__ */ jsxs10(Stack10, { gap: "1", children: [
|
|
1375
|
+
/* @__PURE__ */ jsx10(Text8, { textStyle: "sm", fontWeight: "medium", children: t("thisProject") }),
|
|
1267
1376
|
lines(limits.data)
|
|
1268
1377
|
] }),
|
|
1269
|
-
!
|
|
1270
|
-
/* @__PURE__ */
|
|
1271
|
-
lines(
|
|
1272
|
-
] })
|
|
1378
|
+
!v || !above.some((g) => g.scopeId === null) ? /* @__PURE__ */ jsxs10(Stack10, { gap: "1", children: [
|
|
1379
|
+
/* @__PURE__ */ jsx10(Text8, { textStyle: "sm", fontWeight: "medium", children: t("theSite") }),
|
|
1380
|
+
lines(v ? [] : void 0)
|
|
1381
|
+
] }) : null,
|
|
1382
|
+
above.map((g) => /* @__PURE__ */ jsxs10(Stack10, { gap: "1", children: [
|
|
1383
|
+
/* @__PURE__ */ jsx10(Text8, { textStyle: "sm", fontWeight: "medium", children: g.scopeId ? scopeNames[g.scopeId] ?? g.scopeId : t("theSite") }),
|
|
1384
|
+
lines(g.limits)
|
|
1385
|
+
] }, g.scopeId ?? "site"))
|
|
1273
1386
|
] }) }),
|
|
1274
|
-
/* @__PURE__ */
|
|
1275
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ jsx10(UsagePanel, { scopeId, by: ["model", "purpose", "account"] }),
|
|
1388
|
+
/* @__PURE__ */ jsx10(TryPanel, { scopeId, aliases: aliasNames }, aliases.data && v ? "loaded" : "loading")
|
|
1276
1389
|
] }) });
|
|
1277
1390
|
}
|
|
1278
1391
|
export {
|
|
@@ -1286,6 +1399,7 @@ export {
|
|
|
1286
1399
|
LIMIT_PERIODS,
|
|
1287
1400
|
LimitsEditor,
|
|
1288
1401
|
ModelsPanel,
|
|
1402
|
+
TryPanel,
|
|
1289
1403
|
USAGE_BY,
|
|
1290
1404
|
UsagePanel,
|
|
1291
1405
|
aiPages,
|
|
@@ -1295,6 +1409,7 @@ export {
|
|
|
1295
1409
|
modelRows,
|
|
1296
1410
|
num,
|
|
1297
1411
|
saveLimits,
|
|
1412
|
+
scopeModelRows,
|
|
1298
1413
|
useAiTexts,
|
|
1299
1414
|
useHostKeepsConnections,
|
|
1300
1415
|
useLimitText,
|