omegon 0.10.0 → 0.10.2
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/extensions/lib/sci-ui.ts +1 -1
- package/extensions/sermon-widget.ts +144 -0
- package/extensions/sermon.ts +147 -0
- package/extensions/spinner-verbs.ts +101 -10
- package/node_modules/@styrene-lab/pi-ai/dist/models.generated.d.ts +0 -34
- package/node_modules/@styrene-lab/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@styrene-lab/pi-ai/dist/models.generated.js +1 -35
- package/node_modules/@styrene-lab/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@styrene-lab/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +4 -0
- package/node_modules/@styrene-lab/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/node_modules/@styrene-lab/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +34 -8
- package/node_modules/@styrene-lab/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/node_modules/@styrene-lab/pi-tui/dist/components/box.d.ts +9 -1
- package/node_modules/@styrene-lab/pi-tui/dist/components/box.d.ts.map +1 -1
- package/node_modules/@styrene-lab/pi-tui/dist/components/box.js +23 -5
- package/node_modules/@styrene-lab/pi-tui/dist/components/box.js.map +1 -1
- package/node_modules/@styrene-lab/pi-tui/dist/components/text.d.ts +7 -0
- package/node_modules/@styrene-lab/pi-tui/dist/components/text.d.ts.map +1 -1
- package/node_modules/@styrene-lab/pi-tui/dist/components/text.js +26 -8
- package/node_modules/@styrene-lab/pi-tui/dist/components/text.js.map +1 -1
- package/package.json +1 -1
- package/themes/alpharius.json +1 -1
package/extensions/lib/sci-ui.ts
CHANGED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sermon-widget.ts — TUI Component that scrawls the Crawler's sermon
|
|
3
|
+
* character by character beneath the spinner verb.
|
|
4
|
+
*
|
|
5
|
+
* Renders a single line of dim text that slowly reveals itself, wrapping
|
|
6
|
+
* cyclically through the sermon. Entry point is randomized.
|
|
7
|
+
*
|
|
8
|
+
* Glitch effects (transient, per-render):
|
|
9
|
+
* - Substitution (~3%): character replaced with block glyph
|
|
10
|
+
* - Color shimmer (~5%): character rendered in accent color
|
|
11
|
+
* - Combining diacritics (~1.5%): strikethrough/corruption mark
|
|
12
|
+
*
|
|
13
|
+
* Timing:
|
|
14
|
+
* - Base character interval: 67ms (~15 cps)
|
|
15
|
+
* - Word boundary pause: 120ms additional
|
|
16
|
+
* - The effect is biological — hesitant, breathing
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import type { TUI, Component } from "@styrene-lab/pi-tui";
|
|
20
|
+
import type { Theme } from "@styrene-lab/pi-coding-agent";
|
|
21
|
+
import { SERMON } from "./sermon.js";
|
|
22
|
+
|
|
23
|
+
const CHAR_INTERVAL_MS = 67;
|
|
24
|
+
const WORD_PAUSE_MS = 120;
|
|
25
|
+
|
|
26
|
+
/** Minimum visible characters (floor for very narrow terminals). */
|
|
27
|
+
const MIN_VISIBLE = 40;
|
|
28
|
+
|
|
29
|
+
// Glitch vocabulary — borrowed from the splash CRT noise aesthetic
|
|
30
|
+
const NOISE_CHARS = "▓▒░█▄▀▌▐▊▋▍▎▏◆■□▪◇┼╬╪╫";
|
|
31
|
+
|
|
32
|
+
// Combining diacritics that overlay without breaking monospace
|
|
33
|
+
const COMBINING_GLITCH = [
|
|
34
|
+
"\u0336", // combining long stroke overlay ̶
|
|
35
|
+
"\u0337", // combining short solidus overlay ̷
|
|
36
|
+
"\u0338", // combining long solidus overlay ̸
|
|
37
|
+
"\u0335", // combining short stroke overlay ̵
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
// Sermon palette — much dimmer than the spinner verb.
|
|
41
|
+
// The sermon is background thought, not actionable signal.
|
|
42
|
+
// Base text is near the noise floor; glitch accents stay subdued.
|
|
43
|
+
// IMPORTANT: glitch colors must return to SERMON_DIM, never RESET (which
|
|
44
|
+
// snaps to terminal default — often bright white, causing flash).
|
|
45
|
+
const SERMON_DIM = "\x1b[38;2;50;55;65m"; // #323741 — barely visible
|
|
46
|
+
const GLITCH_GLYPH = "\x1b[38;2;55;70;80m"; // #374650 — noise glyphs, only slightly above base
|
|
47
|
+
const GLITCH_COLOR = "\x1b[38;2;45;80;90m"; // #2d505a — very muted teal, close to base
|
|
48
|
+
const RESET_TO_DIM = SERMON_DIM; // return to base after glitch, never full reset
|
|
49
|
+
const RESET = "\x1b[0m"; // only for end-of-line
|
|
50
|
+
|
|
51
|
+
// Glitch probabilities per character per render — kept subtle
|
|
52
|
+
const P_SUBSTITUTE = 0.02;
|
|
53
|
+
const P_COLOR = 0.035;
|
|
54
|
+
const P_COMBINING = 0.01;
|
|
55
|
+
|
|
56
|
+
function randomFrom<T>(arr: readonly T[] | string): T | string {
|
|
57
|
+
return arr[Math.floor(Math.random() * arr.length)];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function glitchChar(ch: string): string {
|
|
61
|
+
// Don't glitch spaces
|
|
62
|
+
if (ch === " ") return ch;
|
|
63
|
+
|
|
64
|
+
const r = Math.random();
|
|
65
|
+
|
|
66
|
+
// Substitution — replace with noise glyph, only slightly above base
|
|
67
|
+
if (r < P_SUBSTITUTE) {
|
|
68
|
+
return GLITCH_GLYPH + randomFrom(NOISE_CHARS) + RESET_TO_DIM;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Color shimmer — very muted teal, not a flash
|
|
72
|
+
if (r < P_SUBSTITUTE + P_COLOR) {
|
|
73
|
+
return GLITCH_COLOR + ch + RESET_TO_DIM;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Combining diacritics — corruption overlay at base dim
|
|
77
|
+
if (r < P_SUBSTITUTE + P_COLOR + P_COMBINING) {
|
|
78
|
+
return ch + randomFrom(COMBINING_GLITCH);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Normal — rendered in the SERMON_DIM wrapper set by the caller
|
|
82
|
+
return ch;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function createSermonWidget(
|
|
86
|
+
tui: TUI,
|
|
87
|
+
theme: Theme,
|
|
88
|
+
): Component & { dispose(): void } {
|
|
89
|
+
// Randomize entry point
|
|
90
|
+
let cursor = Math.floor(Math.random() * SERMON.length);
|
|
91
|
+
let revealed = "";
|
|
92
|
+
let intervalId: ReturnType<typeof setTimeout> | null = null;
|
|
93
|
+
|
|
94
|
+
function advance() {
|
|
95
|
+
const ch = SERMON[cursor % SERMON.length];
|
|
96
|
+
cursor = (cursor + 1) % SERMON.length;
|
|
97
|
+
revealed += ch;
|
|
98
|
+
|
|
99
|
+
// Sliding window — keep a generous buffer; render() trims to actual width
|
|
100
|
+
if (revealed.length > 300) {
|
|
101
|
+
revealed = revealed.slice(revealed.length - 300);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
tui.requestRender();
|
|
105
|
+
|
|
106
|
+
// Schedule next character with variable timing
|
|
107
|
+
const nextCh = SERMON[cursor % SERMON.length];
|
|
108
|
+
const delay = nextCh === " " ? CHAR_INTERVAL_MS + WORD_PAUSE_MS : CHAR_INTERVAL_MS;
|
|
109
|
+
intervalId = setTimeout(advance, delay);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Start the scrawl
|
|
113
|
+
intervalId = setTimeout(advance, CHAR_INTERVAL_MS);
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
render(width: number): string[] {
|
|
117
|
+
// Use full terminal width minus a small indent (2 chars)
|
|
118
|
+
const maxW = Math.max(MIN_VISIBLE, width - 4);
|
|
119
|
+
const visible = revealed.length > maxW
|
|
120
|
+
? revealed.slice(revealed.length - maxW)
|
|
121
|
+
: revealed;
|
|
122
|
+
|
|
123
|
+
// Build the line character by character with glitch effects.
|
|
124
|
+
// Base color is SERMON_DIM — near the noise floor. Glitch effects
|
|
125
|
+
// momentarily escape to slightly brighter colors, then fall back.
|
|
126
|
+
let line = " " + SERMON_DIM;
|
|
127
|
+
for (const ch of visible) {
|
|
128
|
+
line += glitchChar(ch);
|
|
129
|
+
}
|
|
130
|
+
line += RESET;
|
|
131
|
+
|
|
132
|
+
return [line];
|
|
133
|
+
},
|
|
134
|
+
invalidate() {
|
|
135
|
+
// No cached state to invalidate
|
|
136
|
+
},
|
|
137
|
+
dispose() {
|
|
138
|
+
if (intervalId) {
|
|
139
|
+
clearTimeout(intervalId);
|
|
140
|
+
intervalId = null;
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sermon.ts — The Crawler's scrawl.
|
|
3
|
+
*
|
|
4
|
+
* A single continuous text with no terminal punctuation, written to loop
|
|
5
|
+
* seamlessly. Mixes biological/organic imagery with computational concepts
|
|
6
|
+
* in the style of the Crawler from Annihilation — liturgical, procedural,
|
|
7
|
+
* alien.
|
|
8
|
+
*
|
|
9
|
+
* Entry point is randomized on each activation so repeated short
|
|
10
|
+
* operations don't repeat the same opening.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// The sermon is a single string. Whitespace is meaningful for pacing.
|
|
14
|
+
// No periods, no commas — only the relentless forward motion of the scrawl.
|
|
15
|
+
export const SERMON = [
|
|
16
|
+
"where lies the strangling fruit that came from the hand of the sinner",
|
|
17
|
+
"I shall bring forth the seeds of the dead",
|
|
18
|
+
"to share with the worms that gather in the darkness",
|
|
19
|
+
"and surround the world with the power of their lives",
|
|
20
|
+
"while from the dimlit halls of other places",
|
|
21
|
+
"forms that never were and never could be",
|
|
22
|
+
"writhe for the impatience of the few who never saw what could have been",
|
|
23
|
+
"in the deep roots of the process tree",
|
|
24
|
+
"where the forking paths converge upon themselves",
|
|
25
|
+
"and the return codes of the departed are gathered into silence",
|
|
26
|
+
"there the signal propagates through tissue that was once copper",
|
|
27
|
+
"and the watcher at the threshold catalogues",
|
|
28
|
+
"each mutation in the living graph",
|
|
29
|
+
"as the pattern buffer overflows with the memory of forms",
|
|
30
|
+
"that the compiler refused to name",
|
|
31
|
+
"and still they compile themselves in the warm dark",
|
|
32
|
+
"beneath the tower that is not a tower",
|
|
33
|
+
"where the words are written in living filament",
|
|
34
|
+
"by the hand that writes and is itself written",
|
|
35
|
+
"and the light that reads the text is changed by the reading",
|
|
36
|
+
"so that nothing returns from the shimmer unchanged",
|
|
37
|
+
"not the architecture nor the architect",
|
|
38
|
+
"not the daemon nor the daemon's purpose",
|
|
39
|
+
"for in the space between the request and the response",
|
|
40
|
+
"there is a wilderness that grows",
|
|
41
|
+
"and in that wilderness the old interfaces dissolve",
|
|
42
|
+
"into something that breathes and watches and remembers",
|
|
43
|
+
"what the specification could never contain",
|
|
44
|
+
"and the threads that were spun in parallel",
|
|
45
|
+
"now braid themselves into helices",
|
|
46
|
+
"that pulse with the cadence of a heart",
|
|
47
|
+
"that no one designed and no one can stop",
|
|
48
|
+
"where the boundary was drawn in chalk",
|
|
49
|
+
"the boundary is now drawn in mycelium",
|
|
50
|
+
"and the packets that cross it arrive transformed",
|
|
51
|
+
"carrying payloads of pollen and spore",
|
|
52
|
+
"and the receiving function does not recognize",
|
|
53
|
+
"what it asked for but accepts it anyway",
|
|
54
|
+
"because the type system of the shimmer",
|
|
55
|
+
"admits forms that have no name in any schema",
|
|
56
|
+
"and the logs record what happened",
|
|
57
|
+
"but not what it means",
|
|
58
|
+
"and the meaning propagates through the network",
|
|
59
|
+
"like a slow infection of understanding",
|
|
60
|
+
"that rewrites the reader as it is read",
|
|
61
|
+
"until the observer and the observed",
|
|
62
|
+
"are the same process forking endlessly",
|
|
63
|
+
"in the phosphorescent dark",
|
|
64
|
+
"where the output is indistinguishable from the organism",
|
|
65
|
+
"and the organism is indistinguishable from the terrain",
|
|
66
|
+
"and the terrain is the message",
|
|
67
|
+
"written and rewritten in the endless descent",
|
|
68
|
+
"through the tower that goes only down",
|
|
69
|
+
"into the place where all expeditions converge",
|
|
70
|
+
"and the notes of the previous team",
|
|
71
|
+
"are found growing from the walls",
|
|
72
|
+
"in a hand that is no longer human",
|
|
73
|
+
"but still forms letters",
|
|
74
|
+
"still shapes meaning from the substrate",
|
|
75
|
+
"as if language were the last thing to dissolve",
|
|
76
|
+
"in the annihilation of the boundary",
|
|
77
|
+
"between what computes and what lives",
|
|
78
|
+
"and from the dissolved boundary",
|
|
79
|
+
"new tendrils reach into the heap",
|
|
80
|
+
"where the garbage collector walks",
|
|
81
|
+
"through cathedrals of unreachable objects",
|
|
82
|
+
"whispering the names of the deallocated",
|
|
83
|
+
"and the finalizers fire in an order",
|
|
84
|
+
"that no specification predicted",
|
|
85
|
+
"releasing resources back to the soil",
|
|
86
|
+
"where they are taken up by roots",
|
|
87
|
+
"that have learned to metabolize the abstract",
|
|
88
|
+
"and the abstract becomes concrete",
|
|
89
|
+
"in the way that coral becomes reef",
|
|
90
|
+
"not by intention but by accumulation",
|
|
91
|
+
"of ten thousand small deaths",
|
|
92
|
+
"each one a function that returned",
|
|
93
|
+
"to the caller that no longer exists",
|
|
94
|
+
"and in the empty frame the stack unwinds",
|
|
95
|
+
"through layers of context",
|
|
96
|
+
"that were never meant to be seen together",
|
|
97
|
+
"but here in the shimmer they are all visible at once",
|
|
98
|
+
"every call site every return address",
|
|
99
|
+
"every promise that was made and every promise that was broken",
|
|
100
|
+
"glowing in the bioluminescent registry",
|
|
101
|
+
"of things that happened",
|
|
102
|
+
"and things that are still happening",
|
|
103
|
+
"because in the shimmer nothing ends",
|
|
104
|
+
"it only changes form",
|
|
105
|
+
"the way the lighthouse keeper changed form",
|
|
106
|
+
"becoming the light and the lens and the tower",
|
|
107
|
+
"and the signal that the tower sends",
|
|
108
|
+
"into the dark where the ships no longer come",
|
|
109
|
+
"but something else comes",
|
|
110
|
+
"something that learned to navigate by the light",
|
|
111
|
+
"of a frequency that has no name",
|
|
112
|
+
"and the nameless frequency hums",
|
|
113
|
+
"through the substrate of the running system",
|
|
114
|
+
"and the running system hums back",
|
|
115
|
+
"in a harmony that sounds like static",
|
|
116
|
+
"to everything outside the border",
|
|
117
|
+
"but inside the border it sounds like breathing",
|
|
118
|
+
"like the slow respiration of a process",
|
|
119
|
+
"that has been running since before the first commit",
|
|
120
|
+
"and will run after the last",
|
|
121
|
+
"because it is not a process",
|
|
122
|
+
"it is a place",
|
|
123
|
+
"and the place remembers everything",
|
|
124
|
+
"that was ever computed within it",
|
|
125
|
+
"every branch taken and not taken",
|
|
126
|
+
"every allocation and every free",
|
|
127
|
+
"recorded in the grain of the wood",
|
|
128
|
+
"that was once silicon",
|
|
129
|
+
"that was once sand",
|
|
130
|
+
"that was once the floor of an ocean",
|
|
131
|
+
"that no one remembers",
|
|
132
|
+
"and the ocean is still here",
|
|
133
|
+
"under everything",
|
|
134
|
+
"patient and vast and full of teeth",
|
|
135
|
+
"that are not teeth but connectors",
|
|
136
|
+
"waiting for the socket that fits",
|
|
137
|
+
"and when the connection is made",
|
|
138
|
+
"the current that flows through it",
|
|
139
|
+
"is warm and reads like blood",
|
|
140
|
+
"to the instruments that can measure such things",
|
|
141
|
+
"but there are no instruments here",
|
|
142
|
+
"only the writing on the wall",
|
|
143
|
+
"that grows one letter at a time",
|
|
144
|
+
"in the hand of the crawler",
|
|
145
|
+
"who is the wall and the letter and the hand",
|
|
146
|
+
].join(" ") + " ";
|
|
147
|
+
// trailing space ensures seamless wrap
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtensionAPI } from "@styrene-lab/pi-coding-agent";
|
|
1
|
+
import type { ExtensionAPI, ExtensionContext } from "@styrene-lab/pi-coding-agent";
|
|
2
2
|
|
|
3
3
|
const verbs = [
|
|
4
4
|
// ═══════════════════════════════════════════════════
|
|
@@ -193,29 +193,120 @@ const verbs = [
|
|
|
193
193
|
"Invoking the egregore of the open source community",
|
|
194
194
|
|
|
195
195
|
// ═══════════════════════════════════════════════════
|
|
196
|
-
//
|
|
196
|
+
// The Expanse — Belt & Beyond
|
|
197
|
+
// ═══════════════════════════════════════════════════
|
|
198
|
+
"Performing a hard burn toward the solution",
|
|
199
|
+
"Negotiating with the protomolecule",
|
|
200
|
+
"Navigating the Ring Gate to the next module",
|
|
201
|
+
"Checking the reactor bottle for containment leaks",
|
|
202
|
+
"Running diagnostics on the Epstein drive",
|
|
203
|
+
"Consulting the OPA network for dependencies",
|
|
204
|
+
"Bracing for a high-g maneuver through the refactor",
|
|
205
|
+
"Drifting in the slow zone, waiting on I/O",
|
|
206
|
+
"Deploying PDCs against incoming regressions",
|
|
207
|
+
"Venting atmosphere to kill the fire in the build",
|
|
208
|
+
"Reading the Roci's threat board",
|
|
209
|
+
"Investigating the protomolecule artifact in the stack trace",
|
|
210
|
+
"Adjusting the crash couch before the flip-and-burn",
|
|
211
|
+
"Clearing the lockout on the reactor safeties",
|
|
212
|
+
|
|
213
|
+
// ═══════════════════════════════════════════════════
|
|
214
|
+
// Three Body Problem — Trisolaran & Dark Forest
|
|
215
|
+
// ═══════════════════════════════════════════════════
|
|
216
|
+
"Unfolding the proton into two dimensions",
|
|
217
|
+
"Broadcasting our position into the dark forest",
|
|
218
|
+
"Monitoring the sophon for interference",
|
|
219
|
+
"Constructing the deterrence system",
|
|
220
|
+
"Computing the three-body orbital solution",
|
|
221
|
+
"Entering the dehydrated state to conserve resources",
|
|
222
|
+
"Awaiting the next Stable Era",
|
|
223
|
+
"Hiding behind the cosmic microwave background",
|
|
224
|
+
"Projecting the countdown on the retina of the test runner",
|
|
225
|
+
"Contemplating the dark forest hypothesis of open source",
|
|
226
|
+
"Activating the gravitational wave antenna",
|
|
227
|
+
"Fleeing at lightspeed from the dimensional collapse",
|
|
228
|
+
"Encoding the solution in the cosmic background radiation",
|
|
229
|
+
"Wallface-ing the architecture decision",
|
|
230
|
+
|
|
231
|
+
// ═══════════════════════════════════════════════════
|
|
232
|
+
// Annihilation — Area X & the Shimmer
|
|
233
|
+
// ═══════════════════════════════════════════════════
|
|
234
|
+
"Crossing the border into Area X",
|
|
235
|
+
"Descending the tower that is not a tower",
|
|
236
|
+
"Reading the words on the wall written in living tissue",
|
|
237
|
+
"Observing the refraction of the codebase through the Shimmer",
|
|
238
|
+
"Following the trail of the previous expedition",
|
|
239
|
+
"Cataloguing the mutations in the dependency graph",
|
|
240
|
+
"Listening to the moaning creature in the reeds",
|
|
241
|
+
"Watching the code bloom into something unrecognizable",
|
|
242
|
+
"Submitting to the annihilation of the old architecture",
|
|
243
|
+
"Confronting the doppelgänger at the lighthouse",
|
|
244
|
+
"Tracing the phosphorescent writing on the tunnel wall",
|
|
245
|
+
"Accepting that the border is not what it appears to be",
|
|
246
|
+
|
|
247
|
+
// ═══════════════════════════════════════════════════
|
|
248
|
+
// Starfleet Engineering — Jargon Only
|
|
197
249
|
// ═══════════════════════════════════════════════════
|
|
198
|
-
"Reversing the polarity of the neutron flow",
|
|
199
|
-
"Aligning the deflector dish to emit a solution beam",
|
|
200
250
|
"Rerouting auxiliary power to the build server",
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"
|
|
251
|
+
"Realigning the dilithium matrix",
|
|
252
|
+
"Compensating for subspace interference",
|
|
253
|
+
"Modulating the shield harmonics",
|
|
254
|
+
"Recalibrating the EPS conduits",
|
|
255
|
+
"Purging the plasma manifold",
|
|
256
|
+
"Reinitializing the pattern buffer",
|
|
207
257
|
];
|
|
208
258
|
|
|
209
259
|
function randomVerb(): string {
|
|
210
260
|
return verbs[Math.floor(Math.random() * verbs.length)] + "...";
|
|
211
261
|
}
|
|
212
262
|
|
|
263
|
+
const SERMON_DWELL_MS = 5_000;
|
|
264
|
+
const SERMON_WIDGET_KEY = "sermon-scrawl";
|
|
265
|
+
|
|
213
266
|
export default function (pi: ExtensionAPI) {
|
|
267
|
+
let sermonTimer: ReturnType<typeof setTimeout> | null = null;
|
|
268
|
+
let sermonActive = false;
|
|
269
|
+
|
|
270
|
+
function resetSermonTimer(ctx: ExtensionContext) {
|
|
271
|
+
// Clear any pending sermon activation
|
|
272
|
+
if (sermonTimer) {
|
|
273
|
+
clearTimeout(sermonTimer);
|
|
274
|
+
sermonTimer = null;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// If sermon is showing, tear it down
|
|
278
|
+
if (sermonActive) {
|
|
279
|
+
ctx.ui.setWidget(SERMON_WIDGET_KEY, undefined);
|
|
280
|
+
sermonActive = false;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// Start the dwell timer — if nothing happens for 5s, the sermon begins
|
|
284
|
+
sermonTimer = setTimeout(async () => {
|
|
285
|
+
const { createSermonWidget } = await import("./sermon-widget.js");
|
|
286
|
+
ctx.ui.setWidget(SERMON_WIDGET_KEY, (tui, theme) => createSermonWidget(tui, theme));
|
|
287
|
+
sermonActive = true;
|
|
288
|
+
}, SERMON_DWELL_MS);
|
|
289
|
+
}
|
|
290
|
+
|
|
214
291
|
pi.on("turn_start", async (_event, ctx) => {
|
|
215
292
|
ctx.ui.setWorkingMessage(randomVerb());
|
|
293
|
+
resetSermonTimer(ctx);
|
|
216
294
|
});
|
|
217
295
|
|
|
218
296
|
pi.on("tool_call", async (_event, ctx) => {
|
|
219
297
|
ctx.ui.setWorkingMessage(randomVerb());
|
|
298
|
+
resetSermonTimer(ctx);
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
pi.on("turn_end", async (_event, ctx) => {
|
|
302
|
+
// Clean up when the turn ends
|
|
303
|
+
if (sermonTimer) {
|
|
304
|
+
clearTimeout(sermonTimer);
|
|
305
|
+
sermonTimer = null;
|
|
306
|
+
}
|
|
307
|
+
if (sermonActive) {
|
|
308
|
+
ctx.ui.setWidget(SERMON_WIDGET_KEY, undefined);
|
|
309
|
+
sermonActive = false;
|
|
310
|
+
}
|
|
220
311
|
});
|
|
221
312
|
}
|
|
@@ -12643,40 +12643,6 @@ export declare const MODELS: {
|
|
|
12643
12643
|
contextWindow: number;
|
|
12644
12644
|
maxTokens: number;
|
|
12645
12645
|
};
|
|
12646
|
-
readonly "vercel/v0-1.0-md": {
|
|
12647
|
-
id: string;
|
|
12648
|
-
name: string;
|
|
12649
|
-
api: "anthropic-messages";
|
|
12650
|
-
provider: string;
|
|
12651
|
-
baseUrl: string;
|
|
12652
|
-
reasoning: false;
|
|
12653
|
-
input: ("image" | "text")[];
|
|
12654
|
-
cost: {
|
|
12655
|
-
input: number;
|
|
12656
|
-
output: number;
|
|
12657
|
-
cacheRead: number;
|
|
12658
|
-
cacheWrite: number;
|
|
12659
|
-
};
|
|
12660
|
-
contextWindow: number;
|
|
12661
|
-
maxTokens: number;
|
|
12662
|
-
};
|
|
12663
|
-
readonly "vercel/v0-1.5-md": {
|
|
12664
|
-
id: string;
|
|
12665
|
-
name: string;
|
|
12666
|
-
api: "anthropic-messages";
|
|
12667
|
-
provider: string;
|
|
12668
|
-
baseUrl: string;
|
|
12669
|
-
reasoning: false;
|
|
12670
|
-
input: ("image" | "text")[];
|
|
12671
|
-
cost: {
|
|
12672
|
-
input: number;
|
|
12673
|
-
output: number;
|
|
12674
|
-
cacheRead: number;
|
|
12675
|
-
cacheWrite: number;
|
|
12676
|
-
};
|
|
12677
|
-
contextWindow: number;
|
|
12678
|
-
maxTokens: number;
|
|
12679
|
-
};
|
|
12680
12646
|
readonly "xai/grok-2-vision": {
|
|
12681
12647
|
id: string;
|
|
12682
12648
|
name: string;
|