@chances-ai/ui-core 17.0.0

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.
@@ -0,0 +1,491 @@
1
+ import { defaultFrameScheduler, } from "./frame-scheduler.js";
2
+ import { formatToolCall } from "./tool-line.js";
3
+ /** (5.9) Extract the `linesDiff` block (from the first `@@ -d` hunk header to
4
+ * the end) out of a write/edit permission summary, or null when the summary
5
+ * carries no diff (single-line edits, "diff preview skipped", non-write tools). */
6
+ export function extractDiff(summary) {
7
+ const lines = summary.split("\n");
8
+ const idx = lines.findIndex((l) => /^@@ -\d/.test(l));
9
+ return idx < 0 ? null : lines.slice(idx).join("\n");
10
+ }
11
+ /** (5.8) Default count of leading tool-result lines shown inline before the
12
+ * rest collapses to a `… +N more lines` note. Overridable via
13
+ * `config.tui.toolResultPreviewLines`. */
14
+ const DEFAULT_TOOL_RESULT_PREVIEW_LINES = 12;
15
+ /**
16
+ * Observable view-model. The Ink tree subscribes via useSyncExternalStore and
17
+ * never touches domain objects directly — the only inputs are bus events and the
18
+ * permission resolver. This is the seam that keeps the UI decoupled from core.
19
+ *
20
+ * (5.8) Rendering is split into a committed prefix (frozen scrollback fed to
21
+ * Ink `<Static>`, rendered once) and a small live tail (re-rendered each
22
+ * frame). Streamed `assistant:delta` re-renders are coalesced to one per frame
23
+ * via {@link FrameScheduler}; every structural event force-flushes immediately.
24
+ */
25
+ export class ChatViewModel {
26
+ approval;
27
+ lines = [];
28
+ busy = false;
29
+ pending = null;
30
+ /** (5.3) True while the Shift+Tab-into-yolo confirmation overlay is up.
31
+ * app.tsx renders the red confirm box; `resolveYoloConfirm` clears it. */
32
+ yoloConfirmPending = false;
33
+ /**
34
+ * (5.8) Count of leading `lines` that are committed (frozen). Lines
35
+ * `[0, committedCount)` are append-only — an index's content never changes
36
+ * once committed — and feed Ink `<Static>`. Lines `[committedCount, end)`
37
+ * are the live tail. Advanced ONLY forward (monotonic) so `<Static>` never
38
+ * has to un-render anything. The only line that ever mutates in place is an
39
+ * open assistant line (text grows per delta) and it is always live.
40
+ */
41
+ committedCount = 0;
42
+ /**
43
+ * (5.8) Bumped by `clearLines()` and used as the Ink `<Static key>`. Ink
44
+ * `<Static>` can't be emptied by replacing its items, so `/clear` remounts
45
+ * it under a fresh key (needs `ink >= 7.0.3`, which fixes the
46
+ * remount-with-different-key drop-new-items bug).
47
+ */
48
+ clearGeneration = 0;
49
+ version = 0;
50
+ listeners = new Set();
51
+ assistantOpen = false;
52
+ busUnsubscribers = [];
53
+ scheduler;
54
+ toolResultPreviewLines;
55
+ /** (v17) Injected home dir for `~`-folding; undefined ⇒ no fold. */
56
+ home;
57
+ /** Non-null while a coalesced delta frame is queued (see `scheduleBump`). */
58
+ pendingFrame = null;
59
+ /**
60
+ * (5.9) Diff blocks parsed from `tool:permission` summaries, keyed by callId,
61
+ * awaiting their `tool:result` so they can be attached to the tool line and
62
+ * rendered under the `⎿` branch. Emitted before `gate.evaluate` for every
63
+ * write/edit call (engine.ts:763) — so this populates even under
64
+ * auto-edit/yolo, giving transcript diffs in all approval modes with zero
65
+ * engine/contract change. Cleared on detach/clear so it can't leak.
66
+ */
67
+ diffStash = new Map();
68
+ /**
69
+ * (5.3) Optional session approval-mode holder. When wired (interactive
70
+ * `chat`), the footer reflects `approvalMode` and Shift+Tab / `/approval`
71
+ * mutate it. Left undefined in tests that don't exercise modes — every
72
+ * approval method then no-ops and `approvalMode` reads `"default"`.
73
+ *
74
+ * (5.8) `options` injects the frame scheduler + tool-result preview length;
75
+ * both default so existing callers (`new ChatViewModel()`,
76
+ * `new ChatViewModel(approval)`) keep working unchanged.
77
+ */
78
+ constructor(approval, options) {
79
+ this.approval = approval;
80
+ this.scheduler = options?.scheduler ?? defaultFrameScheduler;
81
+ this.toolResultPreviewLines =
82
+ options?.toolResultPreviewLines ?? DEFAULT_TOOL_RESULT_PREVIEW_LINES;
83
+ this.home = options?.home;
84
+ }
85
+ subscribe = (fn) => {
86
+ this.listeners.add(fn);
87
+ return () => this.listeners.delete(fn);
88
+ };
89
+ getSnapshot = () => this.version;
90
+ /**
91
+ * (5.8) The frozen scrollback prefix — fed to Ink `<Static>` and rendered
92
+ * once. Guaranteed append-only: the element at index `i` never changes once
93
+ * it appears here. A fresh array is returned each call, but the prefix
94
+ * content is stable, which is all `<Static>` relies on.
95
+ */
96
+ committedLines() {
97
+ return this.lines.slice(0, this.committedCount);
98
+ }
99
+ /** (5.8) The live tail re-rendered each frame: the open assistant line while
100
+ * streaming, or an in-flight tool / tool-result line awaiting its terminal
101
+ * event. Usually 0–1 entries. */
102
+ liveLines() {
103
+ return this.lines.slice(this.committedCount);
104
+ }
105
+ /** (5.9) The still-live `tool` line for a callId (normally the last line).
106
+ * Returns a mutable ref so `tool:result` can fill it in place — safe because
107
+ * it is in the live region (index ≥ committedCount), not yet committed. */
108
+ findLiveTool(callId) {
109
+ for (let i = this.lines.length - 1; i >= this.committedCount; i--) {
110
+ const l = this.lines[i];
111
+ if (l && l.kind === "tool" && l.callId === callId)
112
+ return l;
113
+ }
114
+ return undefined;
115
+ }
116
+ /**
117
+ * (5.9 codex R2 MUST-1) Advance `committedCount` toward `target` but NEVER
118
+ * past the earliest still-running tool line (`kind:"tool"` with `ok ===
119
+ * undefined`). A sync/background subagent emits its own `tool:call` /
120
+ * `assistant:delta` frames on the SAME bus BETWEEN a parent `task` tool's
121
+ * call and its result; without this clamp those frames would commit the
122
+ * parent's tool line, after which `findLiveTool` could no longer fill it
123
+ * (mutating a committed line breaks the `<Static>` append-only invariant) and
124
+ * the parent result would spawn a duplicate empty block. Keeping every
125
+ * unresolved tool line live until its result arrives makes the fill always
126
+ * append-only-safe. `turn:end` force-commits unconditionally (the turn is
127
+ * over). Monotonic: `target ≥ committedCount`, and the result is in
128
+ * `[committedCount, target]`.
129
+ */
130
+ commitThrough(target) {
131
+ let limit = target;
132
+ for (let i = this.committedCount; i < target; i++) {
133
+ const l = this.lines[i];
134
+ if (l && l.kind === "tool" && l.ok === undefined) {
135
+ limit = i;
136
+ break;
137
+ }
138
+ }
139
+ if (limit > this.committedCount)
140
+ this.committedCount = limit;
141
+ }
142
+ bump() {
143
+ this.version++;
144
+ for (const l of this.listeners)
145
+ l();
146
+ }
147
+ /**
148
+ * (5.8) Coalesce a streamed-token re-render onto the next frame. The first
149
+ * delta in a window arms the scheduler; later deltas in the same window are
150
+ * no-ops (the text is already accumulated on the line), so N tokens cause
151
+ * at most one render per frame instead of N.
152
+ */
153
+ scheduleBump() {
154
+ if (this.pendingFrame !== null)
155
+ return;
156
+ this.pendingFrame = this.scheduler.schedule(() => {
157
+ this.pendingFrame = null;
158
+ this.bump();
159
+ });
160
+ }
161
+ /** (5.8) Drop a queued delta frame if one is pending. */
162
+ cancelPendingBump() {
163
+ if (this.pendingFrame !== null) {
164
+ this.scheduler.cancel(this.pendingFrame);
165
+ this.pendingFrame = null;
166
+ }
167
+ }
168
+ /**
169
+ * (5.8) Immediate notify that first drops any pending coalesced delta frame.
170
+ * Used by every structural mutation (finished message, tool call/result,
171
+ * turn boundary, user action) so the UI never renders a structural change
172
+ * behind a stale token-stream frame, and a cancelled frame can't fire into a
173
+ * later epoch.
174
+ */
175
+ forceFlush() {
176
+ this.cancelPendingBump();
177
+ this.bump();
178
+ }
179
+ /**
180
+ * Push a standalone, immutable line and commit everything (it and any prior
181
+ * live tail are terminal-on-creation).
182
+ *
183
+ * Closing `assistantOpen` here means a standalone line pushed while a stream
184
+ * is open ends that stream: the next `assistant:delta` opens a FRESH line
185
+ * rather than appending to the committed one — so the committed line is
186
+ * genuinely final (append-only holds; see the interleaving regression test).
187
+ * That a mid-stream user submit / mode-cycle visually splits the assistant
188
+ * message is a pre-existing interaction behavior (NOT a v13 regression — the
189
+ * pre-v13 `pushUser` closed the stream the same way); richer mid-turn input
190
+ * handling (queueing) is a v15 interaction-model concern, out of v13 scope.
191
+ */
192
+ pushCommitted(line) {
193
+ this.assistantOpen = false;
194
+ this.lines.push(line);
195
+ this.committedCount = this.lines.length;
196
+ }
197
+ pushUser(text) {
198
+ this.pushCommitted({ kind: "user", text });
199
+ this.forceFlush();
200
+ }
201
+ pushInfo(text) {
202
+ this.pushCommitted({ kind: "info", text });
203
+ this.forceFlush();
204
+ }
205
+ pushError(text) {
206
+ this.pushCommitted({ kind: "error", text });
207
+ this.forceFlush();
208
+ }
209
+ /** Empties the rendered scrollback — used by `/clear` so the user sees a
210
+ * fresh view alongside the session.clearTurns() that drops the conversation
211
+ * history. The view-model and the underlying session are intentionally
212
+ * separate operations; the slash command sequences both.
213
+ *
214
+ * (5.8) Because Ink `<Static>` keeps everything ever handed to it, emptying
215
+ * `lines` is not enough — `clearGeneration` is bumped so app.tsx can remount
216
+ * `<Static>` under a fresh key. Any pending delta frame is dropped so it
217
+ * can't fire into the cleared epoch. */
218
+ clearLines() {
219
+ this.cancelPendingBump();
220
+ this.lines = [];
221
+ this.committedCount = 0;
222
+ this.clearGeneration++;
223
+ this.assistantOpen = false;
224
+ this.diffStash.clear();
225
+ this.bump();
226
+ }
227
+ attach(bus) {
228
+ // Unsub any prior subscription, but DON'T latch `detached` — `attach`
229
+ // is the lifecycle "this VM is live again" signal, and the latching
230
+ // version of detach (below) is reserved for engine respawns where the
231
+ // caller has already constructed a new VM and is winding this one down.
232
+ for (const unsubscribe of this.busUnsubscribers.splice(0))
233
+ unsubscribe();
234
+ this.detached = false;
235
+ this.busUnsubscribers = [
236
+ bus.on("turn:start", () => {
237
+ this.busy = true;
238
+ this.forceFlush();
239
+ }),
240
+ bus.on("turn:end", () => {
241
+ this.busy = false;
242
+ // Flush the whole live region: the turn is over, nothing more will
243
+ // change any trailing line.
244
+ this.committedCount = this.lines.length;
245
+ this.forceFlush();
246
+ }),
247
+ bus.on("assistant:delta", (e) => {
248
+ if (!this.assistantOpen) {
249
+ // Commit any prior live tail before the new narration line opens
250
+ // (but not past an unresolved tool line — see `commitThrough`).
251
+ this.commitThrough(this.lines.length);
252
+ this.lines.push({ kind: "assistant", text: "" });
253
+ this.assistantOpen = true;
254
+ }
255
+ this.lines[this.lines.length - 1].text += e.text;
256
+ // Coalesce: at most one render per frame for a fast token stream.
257
+ this.scheduleBump();
258
+ }),
259
+ bus.on("assistant:message", () => {
260
+ // The streamed line is final — commit it (not past an unresolved tool).
261
+ this.assistantOpen = false;
262
+ this.commitThrough(this.lines.length);
263
+ this.forceFlush();
264
+ }),
265
+ bus.on("tool:call", (e) => {
266
+ // A tool-using turn emits NO `assistant:message`, so closing the open
267
+ // assistant line here is what commits the narration (codex R1 MF-2).
268
+ // (5.9) One line per tool call: the same line later gains its result /
269
+ // diff (filled in `tool:result` while still LIVE), so the `⏺` dot can
270
+ // reflect the final ok/err without ever mutating a committed line.
271
+ this.assistantOpen = false;
272
+ this.lines.push({
273
+ kind: "tool",
274
+ toolName: e.name,
275
+ text: formatToolCall(e.name, e.args, { home: this.home }),
276
+ callId: e.callId,
277
+ });
278
+ // Commit prior lines, but not past an earlier still-running tool line
279
+ // (e.g. the parent `task` line while a subagent streams).
280
+ this.commitThrough(this.lines.length - 1);
281
+ this.forceFlush();
282
+ }),
283
+ bus.on("tool:permission", (e) => {
284
+ // (5.9) Stash the diff for the matching tool:result. No UI change here —
285
+ // the prompt overlay reads `vm.pending.req.summary` directly.
286
+ const diff = extractDiff(e.summary);
287
+ if (diff !== null)
288
+ this.diffStash.set(e.callId, { diff, anchored: e.name === "write" });
289
+ }),
290
+ bus.on("tool:result", (e) => {
291
+ // (5.9) Fill the still-live tool line (append-only safe) and commit the
292
+ // now-complete block. Attach any stashed diff (write/edit).
293
+ const stash = this.diffStash.get(e.callId);
294
+ this.diffStash.delete(e.callId);
295
+ const line = this.findLiveTool(e.callId);
296
+ const result = previewToolResult(e.output, this.toolResultPreviewLines);
297
+ if (line) {
298
+ line.ok = e.ok;
299
+ line.result = result;
300
+ if (stash) {
301
+ line.diff = stash.diff;
302
+ line.anchored = stash.anchored;
303
+ }
304
+ }
305
+ else {
306
+ // No matching live call line (defensive) — push a standalone block.
307
+ this.lines.push({
308
+ kind: "tool",
309
+ toolName: e.name,
310
+ text: "",
311
+ ok: e.ok,
312
+ result,
313
+ ...(stash ? { diff: stash.diff, anchored: stash.anchored } : {}),
314
+ });
315
+ }
316
+ // The filled line is now resolved; commit up to it (but still not past
317
+ // any EARLIER unresolved tool line — e.g. an outer parent task).
318
+ this.commitThrough(this.lines.length);
319
+ this.forceFlush();
320
+ }),
321
+ bus.on("error", (e) => {
322
+ this.pushCommitted({ kind: "error", text: `${e.code}: ${e.message}` });
323
+ this.forceFlush();
324
+ }),
325
+ ];
326
+ }
327
+ /**
328
+ * (3.4 — codex Round-2 MUST-FIX #2) Once a VM is detached (engine
329
+ * respawn via `/resume`, `/clear` shouldn't detach but if a future
330
+ * caller does), any in-flight `requestPermission` is rejected with
331
+ * a synthetic "denied" decision so the closing-over-stale-resolver
332
+ * call sites (notably the background-task child engine that holds
333
+ * `deps.gate` from before the respawn) don't hang waiting for a
334
+ * prompt that will never reach a user. Any *future* call to
335
+ * `requestPermission` on this detached VM short-circuits the same
336
+ * way — same reasoning.
337
+ *
338
+ * (5.8) Also drops any pending coalesced frame so a scheduled bump
339
+ * can't fire into a remounted/stale epoch.
340
+ */
341
+ detach() {
342
+ for (const unsubscribe of this.busUnsubscribers.splice(0))
343
+ unsubscribe();
344
+ this.detached = true;
345
+ this.cancelPendingBump();
346
+ this.diffStash.clear();
347
+ if (this.pending) {
348
+ const p = this.pending;
349
+ this.pending = null;
350
+ // (5.10b) Reject in-flight requests in their own variant.
351
+ p.resolve(p.req.kind === "question" ? { kind: "question", answers: {}, declined: true } : { allow: false });
352
+ }
353
+ }
354
+ detached = false;
355
+ /** Returned to the PermissionGate as its resolver. After `detach()`,
356
+ * any call resolves denied synchronously — see `detach()` docstring. */
357
+ requestPermission = (req) => {
358
+ if (this.detached) {
359
+ // (5.10b) Decline in the request's own variant.
360
+ return Promise.resolve(req.kind === "question" ? { kind: "question", answers: {}, declined: true } : { allow: false });
361
+ }
362
+ return new Promise((resolve) => {
363
+ this.pending = { req, resolve };
364
+ this.forceFlush();
365
+ });
366
+ };
367
+ /**
368
+ * (5.3) Resolve the open permission prompt with a full decision:
369
+ * - `{allow:true}` — approve once (not remembered).
370
+ * - `{allow:true, remember:true}` — approve & don't ask again (the gate
371
+ * caches it even for un-scoped tools like file-write).
372
+ * - `{allow:false}` — plain deny.
373
+ * - `{allow:false, feedback}` — deny + relay the user's note to the model.
374
+ */
375
+ resolvePermission(decision) {
376
+ const p = this.pending;
377
+ // (5.10b) Authorization-only path; a question pending is settled via
378
+ // resolveQuestion. Narrowing on `kind` also lets us read `req.summary`.
379
+ if (!p || p.req.kind === "question") {
380
+ this.forceFlush();
381
+ return;
382
+ }
383
+ this.pending = null;
384
+ const verb = decision.allow
385
+ ? decision.remember
386
+ ? "approved (won't ask again)"
387
+ : "approved"
388
+ : decision.feedback
389
+ ? "denied with feedback"
390
+ : "denied";
391
+ this.pushCommitted({ kind: "info", text: `${verb}: ${p.req.summary}` });
392
+ p.resolve(decision);
393
+ this.forceFlush();
394
+ }
395
+ /**
396
+ * (5.10b) Resolve an open QUESTION prompt with the user's answers (or a
397
+ * decline). Mirrors {@link resolvePermission} for the `question` pending
398
+ * variant — the `ask_user_question` tool turns the decision into the
399
+ * model-facing tool result.
400
+ */
401
+ resolveQuestion(decision) {
402
+ const p = this.pending;
403
+ if (!p || p.req.kind !== "question") {
404
+ this.forceFlush();
405
+ return;
406
+ }
407
+ this.pending = null;
408
+ const header = p.req.questions[0]?.header ?? "question";
409
+ this.pushCommitted({
410
+ kind: "info",
411
+ text: `${decision.declined ? "declined" : "answered"}: ${header}`,
412
+ });
413
+ p.resolve(decision);
414
+ this.forceFlush();
415
+ }
416
+ // -- approval mode (5.3) ----------------------------------------------------
417
+ /** The current session approval mode (`"default"` when unwired). */
418
+ get approvalMode() {
419
+ return this.approval?.get() ?? "default";
420
+ }
421
+ /**
422
+ * Shift+Tab handler. Advances the cycle; cycling INTO `yolo` without a prior
423
+ * confirmation opens the confirm overlay instead of switching (the typed
424
+ * `/approval yolo` path counts as consent and skips this — see
425
+ * `setApprovalMode`).
426
+ */
427
+ cycleApprovalMode() {
428
+ if (!this.approval)
429
+ return;
430
+ const next = this.approval.next();
431
+ if (next === "yolo" && !this.approval.isYoloConfirmed()) {
432
+ this.yoloConfirmPending = true;
433
+ this.forceFlush();
434
+ return;
435
+ }
436
+ this.approval.set(next);
437
+ this.pushCommitted({ kind: "info", text: `approval mode → ${next}` });
438
+ this.forceFlush();
439
+ }
440
+ /** Resolve the yolo confirm overlay. `confirm` latches yolo for the session. */
441
+ resolveYoloConfirm(confirm) {
442
+ this.yoloConfirmPending = false;
443
+ if (confirm && this.approval) {
444
+ this.approval.confirmYolo();
445
+ this.approval.set("yolo");
446
+ this.pushCommitted({
447
+ kind: "info",
448
+ text: "approval mode → yolo (all tool calls auto-approved)",
449
+ });
450
+ }
451
+ this.forceFlush();
452
+ }
453
+ }
454
+ /** Secondary guard for {@link previewToolResult}: a generous total-character
455
+ * ceiling so a single very long line (e.g. minified JSON with no newlines)
456
+ * can't blow up the live render even though it passes the line-count check.
457
+ * Far larger than the old hard 400-char clip — it only bites pathological
458
+ * single lines, never normal multi-line diffs / command output. The full
459
+ * output is already on disk when it overflowed (the result banner). */
460
+ const MAX_PREVIEW_CHARS = 8000;
461
+ /**
462
+ * (5.8) Line-aware tool-result preview: show the first `maxLines` content
463
+ * lines, then collapse the rest to a `… +N more lines` note. Replaces the old
464
+ * hard 400-char clip, which truncated multi-line diffs / command output
465
+ * mid-line. When a tool's full output overflowed it was already persisted to
466
+ * disk and the path is part of `output` (the banner), so nothing is lost.
467
+ *
468
+ * A single trailing newline is not counted as a hidden line (codex R2
469
+ * SHOULD-FIX): `"a\nb\n"` is two content lines, not three. After the
470
+ * line-aware pass, {@link MAX_PREVIEW_CHARS} caps a pathological single huge
471
+ * line (codex R2 NICE).
472
+ */
473
+ function previewToolResult(output, maxLines) {
474
+ const lines = output.split("\n");
475
+ // A terminal "\n" yields a final empty segment that isn't a content line.
476
+ const contentLineCount = lines.length > 0 && lines[lines.length - 1] === "" ? lines.length - 1 : lines.length;
477
+ let preview;
478
+ if (contentLineCount <= maxLines) {
479
+ preview = output;
480
+ }
481
+ else {
482
+ const hidden = contentLineCount - maxLines;
483
+ preview = `${lines.slice(0, maxLines).join("\n")}\n… +${hidden} more line${hidden === 1 ? "" : "s"}`;
484
+ }
485
+ if (preview.length > MAX_PREVIEW_CHARS) {
486
+ const hiddenChars = preview.length - MAX_PREVIEW_CHARS;
487
+ preview = `${preview.slice(0, MAX_PREVIEW_CHARS)}… +${hiddenChars} more characters`;
488
+ }
489
+ return preview;
490
+ }
491
+ //# sourceMappingURL=view-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-model.js","sourceRoot":"","sources":["../src/view-model.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;oFAEoF;AACpF,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC;AA2BD;;2CAE2C;AAC3C,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAc7C;;;;;;;;;GASG;AACH,MAAM,OAAO,aAAa;IAwDL;IAvDnB,KAAK,GAAW,EAAE,CAAC;IACnB,IAAI,GAAG,KAAK,CAAC;IACb,OAAO,GAAmB,IAAI,CAAC;IAC/B;+EAC2E;IAC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C;QACjC,OAAO,GAAG,MAAM,CAAC;IACnB,CAAC;SAAM,CAAC;QACN,MAAM,MAAM,GAAG,gBAAgB,GAAG,QAAQ,CAAC;QAC3C,OAAO,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,MAAM,aAAa,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;IACvG,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,iBAAiB,EAAE,CAAC;QACvC,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,iBAAiB,CAAC;QACvD,OAAO,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC,MAAM,WAAW,kBAAkB,CAAC;IACtF,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@chances-ai/ui-core",
3
+ "version": "17.0.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "dependencies": {
17
+ "@chances-ai/runtime": "17.0.0",
18
+ "@chances-ai/tools": "17.0.0",
19
+ "diff": "^9.0.0",
20
+ "highlight.js": "^11.11.1"
21
+ },
22
+ "scripts": {
23
+ "build": "tsc -b",
24
+ "check": "tsc -b",
25
+ "test": "bun test"
26
+ }
27
+ }