@gmickel/gno 1.12.2 → 1.12.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.md +1 -1
- package/assets/skill/SKILL.md +4 -2
- package/package.json +2 -1
- package/src/core/context-resolver.ts +285 -0
- package/src/core/indexed-reference.ts +68 -0
- package/src/core/ref-parser.ts +6 -1
- package/src/index.ts +11 -2
- package/src/ingestion/sync.ts +182 -15
- package/src/ingestion/types.ts +2 -0
- package/src/mcp/resources/index.ts +71 -47
- package/src/mcp/tools/get.ts +108 -93
- package/src/mcp/tools/index.ts +3 -3
- package/src/mcp/tools/multi-get.ts +116 -99
- package/src/pipeline/answer-prompt.ts +80 -0
- package/src/pipeline/answer.ts +12 -26
- package/src/pipeline/hybrid.ts +2 -0
- package/src/pipeline/result-context.ts +51 -0
- package/src/pipeline/search.ts +5 -1
- package/src/pipeline/vsearch.ts +2 -0
- package/src/sdk/client.ts +56 -31
- package/src/serve/public/components/AIModelSelector.tsx +22 -7
- package/src/serve/public/globals.built.css +1 -1
- package/src/serve/public/pages/Dashboard.tsx +1 -1
- package/src/serve/routes/api.ts +26 -1
- package/src/serve/server.ts +11 -2
- package/src/serve/status.ts +24 -0
- package/src/serve/watch-service.ts +2 -1
- package/src/store/sqlite/adapter.ts +106 -49
- package/src/store/sqlite/scoped-index.ts +68 -0
- package/src/store/types.ts +9 -1
|
@@ -128,6 +128,7 @@ function formatModelRole(uri: string | undefined): string {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
export interface AIModelSelectorProps {
|
|
131
|
+
appStatus?: AppStatusResponse | null;
|
|
131
132
|
onPresetChange?: (presetId: string) => void;
|
|
132
133
|
showDetails?: boolean;
|
|
133
134
|
showDownloadAction?: boolean;
|
|
@@ -139,6 +140,7 @@ function isCustomPreset(preset: Preset): boolean {
|
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
export function AIModelSelector({
|
|
143
|
+
appStatus,
|
|
142
144
|
onPresetChange,
|
|
143
145
|
showDetails = false,
|
|
144
146
|
showDownloadAction = true,
|
|
@@ -164,6 +166,7 @@ export function AIModelSelector({
|
|
|
164
166
|
null
|
|
165
167
|
);
|
|
166
168
|
const pollInterval = useRef<ReturnType<typeof setInterval> | null>(null);
|
|
169
|
+
const parentOwnsStatus = useRef(appStatus !== undefined);
|
|
167
170
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
168
171
|
const menuRef = useRef<HTMLDivElement>(null);
|
|
169
172
|
const triggerRef = useRef<HTMLButtonElement>(null);
|
|
@@ -274,13 +277,15 @@ export function AIModelSelector({
|
|
|
274
277
|
setLoading(false);
|
|
275
278
|
});
|
|
276
279
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
280
|
+
if (!parentOwnsStatus.current) {
|
|
281
|
+
void apiFetch<AppStatusResponse>("/api/status").then(({ data }) => {
|
|
282
|
+
if (data) {
|
|
283
|
+
setModelsNeeded(
|
|
284
|
+
data.bootstrap.models.cachedCount < data.bootstrap.models.totalCount
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
}
|
|
284
289
|
|
|
285
290
|
void apiFetch<DownloadStatus>("/api/models/status").then(({ data }) => {
|
|
286
291
|
if (data?.active) {
|
|
@@ -290,6 +295,16 @@ export function AIModelSelector({
|
|
|
290
295
|
});
|
|
291
296
|
}, [checkCapabilities]);
|
|
292
297
|
|
|
298
|
+
useEffect(() => {
|
|
299
|
+
if (!appStatus) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
setModelsNeeded(
|
|
303
|
+
appStatus.bootstrap.models.cachedCount <
|
|
304
|
+
appStatus.bootstrap.models.totalCount
|
|
305
|
+
);
|
|
306
|
+
}, [appStatus]);
|
|
307
|
+
|
|
293
308
|
// Polling
|
|
294
309
|
useEffect(() => {
|
|
295
310
|
if (downloading && !pollInterval.current) {
|