@fungi.computer/parakeet 0.11.2 → 0.11.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.
|
@@ -5,6 +5,7 @@ import { memo, useContext } from "react";
|
|
|
5
5
|
import { disclosureOpen, initialToolDisclosure, } from "../core/tool-groups.js";
|
|
6
6
|
import { assistantMessageVisible } from "../core/assistant-visibility.js";
|
|
7
7
|
import { formatTokenCount } from "../core/format-context.js";
|
|
8
|
+
import { SetupNotice } from "@fungi.computer/caps/blocks/setup-notice";
|
|
8
9
|
import { FailureLine } from "@fungi.computer/caps/components/failure-line";
|
|
9
10
|
import { ParakeetHostFactsContext, plainModelFailure } from "../host-facts.js";
|
|
10
11
|
import { ChatMessage, PendingMessageStatus } from "./ChatMessage.js";
|
|
@@ -53,12 +54,16 @@ export const TimelineItem = memo(function TimelineItem({ item, onDismissFailed,
|
|
|
53
54
|
if (modelFailure !== undefined) {
|
|
54
55
|
// One line per run of identical failures, never the raw code.
|
|
55
56
|
// With no model connected the composer already says so, with the fix.
|
|
56
|
-
if (modelFailure.unreachable
|
|
57
|
+
if ((modelFailure.unreachable || modelFailure.setup) &&
|
|
58
|
+
facts.modelSetup?.state === "missing")
|
|
57
59
|
return null;
|
|
60
|
+
// A run that needed a model nobody connected: the fix is setup, and Retry would loop.
|
|
61
|
+
if (modelFailure.setup && facts.modelSetup !== undefined)
|
|
62
|
+
return (_jsx(SetupNotice, { cause: "The run could not start because no model is connected.", fix: facts.modelSetup.fix, need: "Connect a model", variant: "inline" }));
|
|
58
63
|
const tries = item.repeatCount ?? 1;
|
|
59
64
|
return (_jsxs("div", { "data-failure": item.id, children: [_jsx(FailureLine, { message: tries > 1
|
|
60
65
|
? `${modelFailure.message} · ${String(tries)} tries`
|
|
61
|
-
: modelFailure.message, ...(onRetry === undefined
|
|
66
|
+
: modelFailure.message, ...(onRetry === undefined || modelFailure.setup
|
|
62
67
|
? {}
|
|
63
68
|
: { onRetry, retryAriaLabel: "Retry prompt" }) }), _jsx("div", { className: "px-3 text-xs text-dim", ...(item.providerError === undefined
|
|
64
69
|
? {}
|
package/dist/host-facts.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export declare const ParakeetHostFactsContext: import("react").Context<Readonly<
|
|
|
31
31
|
/** A failed model run in plain words; `detail` is the stored text, kept for a details disclosure. */
|
|
32
32
|
export type PlainModelFailure = Readonly<{
|
|
33
33
|
unreachable: boolean;
|
|
34
|
+
/** No model provider is connected: the fix is setup, not a retry. */
|
|
35
|
+
setup: boolean;
|
|
34
36
|
message: string;
|
|
35
37
|
detail: string;
|
|
36
38
|
}>;
|
package/dist/host-facts.js
CHANGED
|
@@ -8,13 +8,31 @@ export function plainModelFailure(text) {
|
|
|
8
8
|
if (text === unfinishedRun)
|
|
9
9
|
return {
|
|
10
10
|
unreachable: false,
|
|
11
|
+
setup: false,
|
|
11
12
|
message: "The run couldn’t finish",
|
|
12
13
|
detail: text,
|
|
13
14
|
};
|
|
14
15
|
const code = modelFailure.exec(text)?.[1];
|
|
15
16
|
if (code === undefined)
|
|
16
17
|
return undefined;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
if (code === "setup_required")
|
|
19
|
+
return {
|
|
20
|
+
unreachable: false,
|
|
21
|
+
setup: true,
|
|
22
|
+
message: "No model is connected",
|
|
23
|
+
detail: text,
|
|
24
|
+
};
|
|
25
|
+
return code === "provider_unavailable"
|
|
26
|
+
? {
|
|
27
|
+
unreachable: true,
|
|
28
|
+
setup: false,
|
|
29
|
+
message: "Couldn’t reach the model",
|
|
30
|
+
detail: text,
|
|
31
|
+
}
|
|
32
|
+
: {
|
|
33
|
+
unreachable: false,
|
|
34
|
+
setup: false,
|
|
35
|
+
message: "The model request failed",
|
|
36
|
+
detail: text,
|
|
37
|
+
};
|
|
20
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/parakeet",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Standalone React composer for a typed Shiitake Session",
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@earendil-works/pi-ai": "1.3.0",
|
|
63
|
-
"@fungi.computer/agar": "0.9.
|
|
63
|
+
"@fungi.computer/agar": "0.9.1",
|
|
64
64
|
"@fungi.computer/bird-dog": "0.3.6",
|
|
65
65
|
"@fungi.computer/cairn": "0.1.0",
|
|
66
66
|
"@fungi.computer/caps": "0.10.1",
|
|
67
67
|
"@fungi.computer/gills": "0.3.0",
|
|
68
68
|
"@fungi.computer/knapsack": "0.4.9",
|
|
69
|
-
"@fungi.computer/shiitake": "0.12.
|
|
69
|
+
"@fungi.computer/shiitake": "0.12.4",
|
|
70
70
|
"@fungi.computer/sigils": "0.3.0",
|
|
71
71
|
"@fungi.computer/sprite": "0.2.2",
|
|
72
72
|
"@fungi.computer/sprite-zdog": "0.3.2",
|