cvc-tui 0.4.0 → 0.4.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/dist/entry.js +71148 -61
- package/package.json +2 -2
- package/dist/app/completion.js +0 -102
- package/dist/app/createGatewayEventHandler.js +0 -508
- package/dist/app/createSlashHandler.js +0 -101
- package/dist/app/delegationStore.js +0 -51
- package/dist/app/gatewayContext.js +0 -17
- package/dist/app/historyStore.js +0 -123
- package/dist/app/inputBuffer.js +0 -120
- package/dist/app/inputSelectionStore.js +0 -8
- package/dist/app/inputStore.js +0 -28
- package/dist/app/interfaces.js +0 -6
- package/dist/app/overlayStore.js +0 -40
- package/dist/app/promptStore.js +0 -44
- package/dist/app/queueStore.js +0 -25
- package/dist/app/scroll.js +0 -44
- package/dist/app/setupHandoff.js +0 -28
- package/dist/app/slash/commands/core.js +0 -479
- package/dist/app/slash/commands/debug.js +0 -44
- package/dist/app/slash/commands/ops.js +0 -498
- package/dist/app/slash/commands/session.js +0 -431
- package/dist/app/slash/commands/setup.js +0 -20
- package/dist/app/slash/commands/toggles.js +0 -40
- package/dist/app/slash/registry.js +0 -18
- package/dist/app/slash/types.js +0 -1
- package/dist/app/spawnHistoryStore.js +0 -105
- package/dist/app/turnController.js +0 -650
- package/dist/app/turnStore.js +0 -48
- package/dist/app/uiStore.js +0 -36
- package/dist/app/useComposerState.js +0 -265
- package/dist/app/useConfigSync.js +0 -144
- package/dist/app/useInputHandlers.js +0 -403
- package/dist/app/useLongRunToolCharms.js +0 -50
- package/dist/app/useMainApp.js +0 -629
- package/dist/app/useSessionLifecycle.js +0 -175
- package/dist/app/useSubmission.js +0 -287
- package/dist/app.js +0 -15
- package/dist/banner.js +0 -57
- package/dist/components/agentsOverlay.js +0 -474
- package/dist/components/appChrome.js +0 -252
- package/dist/components/appLayout.js +0 -121
- package/dist/components/appOverlays.js +0 -65
- package/dist/components/branding.js +0 -97
- package/dist/components/fpsOverlay.js +0 -22
- package/dist/components/helpHint.js +0 -21
- package/dist/components/markdown.js +0 -501
- package/dist/components/maskedPrompt.js +0 -12
- package/dist/components/messageLine.js +0 -82
- package/dist/components/modelPicker.js +0 -254
- package/dist/components/overlayControls.js +0 -30
- package/dist/components/overlays/confirmPrompt.js +0 -25
- package/dist/components/overlays/helpOverlay.js +0 -76
- package/dist/components/overlays/historySearch.js +0 -49
- package/dist/components/overlays/modelPicker.js +0 -60
- package/dist/components/overlays/overlayUtils.js +0 -19
- package/dist/components/overlays/secretPrompt.js +0 -36
- package/dist/components/overlays/sessionPicker.js +0 -93
- package/dist/components/overlays/skillsHub.js +0 -71
- package/dist/components/prompts.js +0 -95
- package/dist/components/queuedMessages.js +0 -24
- package/dist/components/sessionPicker.js +0 -130
- package/dist/components/skillsHub.js +0 -165
- package/dist/components/streamingAssistant.js +0 -35
- package/dist/components/streamingMarkdown.js +0 -144
- package/dist/components/textInput.js +0 -794
- package/dist/components/themed.js +0 -12
- package/dist/components/thinking.js +0 -496
- package/dist/components/todoPanel.js +0 -40
- package/dist/components/transcript.js +0 -22
- package/dist/config/env.js +0 -18
- package/dist/config/limits.js +0 -22
- package/dist/config/timing.js +0 -18
- package/dist/content/charms.js +0 -5
- package/dist/content/faces.js +0 -21
- package/dist/content/fortunes.js +0 -29
- package/dist/content/hotkeys.js +0 -38
- package/dist/content/placeholders.js +0 -15
- package/dist/content/setup.js +0 -14
- package/dist/content/verbs.js +0 -41
- package/dist/domain/details.js +0 -53
- package/dist/domain/messages.js +0 -63
- package/dist/domain/paths.js +0 -16
- package/dist/domain/providers.js +0 -11
- package/dist/domain/roles.js +0 -6
- package/dist/domain/slash.js +0 -11
- package/dist/domain/usage.js +0 -1
- package/dist/domain/viewport.js +0 -33
- package/dist/gateway/client.js +0 -312
- package/dist/gatewayClient.js +0 -574
- package/dist/gatewayTypes.js +0 -1
- package/dist/hooks/useCompletion.js +0 -86
- package/dist/hooks/useGitBranch.js +0 -58
- package/dist/hooks/useInputHistory.js +0 -12
- package/dist/hooks/useQueue.js +0 -57
- package/dist/hooks/useVirtualHistory.js +0 -401
- package/dist/lib/circularBuffer.js +0 -43
- package/dist/lib/clipboard.js +0 -126
- package/dist/lib/editor.js +0 -41
- package/dist/lib/editor.test.js +0 -58
- package/dist/lib/emoji.js +0 -49
- package/dist/lib/externalCli.js +0 -11
- package/dist/lib/forceTruecolor.js +0 -26
- package/dist/lib/fpsStore.js +0 -36
- package/dist/lib/gracefulExit.js +0 -29
- package/dist/lib/history.js +0 -69
- package/dist/lib/inputMetrics.js +0 -143
- package/dist/lib/liveProgress.js +0 -51
- package/dist/lib/liveProgress.test.js +0 -89
- package/dist/lib/mathUnicode.js +0 -685
- package/dist/lib/memory.js +0 -123
- package/dist/lib/memoryMonitor.js +0 -76
- package/dist/lib/messages.js +0 -3
- package/dist/lib/messages.test.js +0 -25
- package/dist/lib/osc52.js +0 -53
- package/dist/lib/perfPane.js +0 -94
- package/dist/lib/platform.js +0 -312
- package/dist/lib/precisionWheel.js +0 -25
- package/dist/lib/reasoning.js +0 -39
- package/dist/lib/rpc.js +0 -26
- package/dist/lib/subagentTree.js +0 -287
- package/dist/lib/syntax.js +0 -89
- package/dist/lib/terminalModes.js +0 -46
- package/dist/lib/terminalParity.js +0 -48
- package/dist/lib/terminalSetup.js +0 -321
- package/dist/lib/text.js +0 -203
- package/dist/lib/text.test.js +0 -18
- package/dist/lib/todo.js +0 -2
- package/dist/lib/todo.test.js +0 -22
- package/dist/lib/viewportStore.js +0 -82
- package/dist/lib/virtualHeights.js +0 -61
- package/dist/lib/wheelAccel.js +0 -143
- package/dist/theme.js +0 -398
- package/dist/types.js +0 -1
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Ported from CVC Agent (https://github.com/NousResearch/cvc)
|
|
4
|
-
// Original Copyright (c) 2025 Nous Research. CVC adaptations (c) 2026 Jai Kumar Meena.
|
|
5
|
-
import { describe, expect, it } from 'vitest';
|
|
6
|
-
import { appendToolShelfMessage, canHoldToolShelf, isTodoDone, mergeToolShelfInto } from './liveProgress.js';
|
|
7
|
-
describe('isTodoDone', () => {
|
|
8
|
-
it('only treats non-empty all-completed/cancelled lists as done', () => {
|
|
9
|
-
expect(isTodoDone([])).toBe(false);
|
|
10
|
-
expect(isTodoDone([{ content: 'x', id: 'x', status: 'completed' }])).toBe(true);
|
|
11
|
-
expect(isTodoDone([{ content: 'x', id: 'x', status: 'in_progress' }])).toBe(false);
|
|
12
|
-
expect(isTodoDone([
|
|
13
|
-
{ content: 'x', id: 'x', status: 'completed' },
|
|
14
|
-
{ content: 'y', id: 'y', status: 'cancelled' }
|
|
15
|
-
])).toBe(true);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
describe('tool shelf helpers', () => {
|
|
19
|
-
it('recognizes contextual thinking shelves as holders', () => {
|
|
20
|
-
expect(canHoldToolShelf({ kind: 'trail', role: 'system', text: '', thinking: 'plan' })).toBe(true);
|
|
21
|
-
expect(canHoldToolShelf({ kind: 'trail', role: 'system', text: '', tools: ['one ✓'] })).toBe(true);
|
|
22
|
-
expect(canHoldToolShelf({ role: 'assistant', text: 'done' })).toBe(false);
|
|
23
|
-
});
|
|
24
|
-
it('merges source rows into an existing shelf', () => {
|
|
25
|
-
expect(mergeToolShelfInto({ kind: 'trail', role: 'system', text: '', thinking: 'plan', tools: ['one ✓'] }, { kind: 'trail', role: 'system', text: '', tools: ['two ✓'] })).toEqual({ kind: 'trail', role: 'system', text: '', thinking: 'plan', tools: ['one ✓', 'two ✓'] });
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
describe('appendToolShelfMessage', () => {
|
|
29
|
-
it('merges adjacent tool shelves into one contextual shelf', () => {
|
|
30
|
-
const merged = appendToolShelfMessage([{ kind: 'trail', role: 'system', text: '', tools: ['one ✓'] }], {
|
|
31
|
-
kind: 'trail',
|
|
32
|
-
role: 'system',
|
|
33
|
-
text: '',
|
|
34
|
-
tools: ['two ✓']
|
|
35
|
-
});
|
|
36
|
-
expect(merged).toEqual([{ kind: 'trail', role: 'system', text: '', tools: ['one ✓', 'two ✓'] }]);
|
|
37
|
-
});
|
|
38
|
-
it('adds tools to the nearest contextual thinking shelf', () => {
|
|
39
|
-
const merged = appendToolShelfMessage([{ kind: 'trail', role: 'system', text: '', thinking: 'plan', tools: ['one ✓'] }], { kind: 'trail', role: 'system', text: '', tools: ['two ✓'] });
|
|
40
|
-
expect(merged).toEqual([{ kind: 'trail', role: 'system', text: '', thinking: 'plan', tools: ['one ✓', 'two ✓'] }]);
|
|
41
|
-
});
|
|
42
|
-
it('merges through intervening thinking-only rows back into the nearest holder', () => {
|
|
43
|
-
const prev = [
|
|
44
|
-
{ kind: 'trail', role: 'system', text: '', thinking: 'plan', tools: ['one ✓'] },
|
|
45
|
-
{ kind: 'trail', role: 'system', text: '', thinking: 'more plan' }
|
|
46
|
-
];
|
|
47
|
-
const merged = appendToolShelfMessage(prev, {
|
|
48
|
-
kind: 'trail',
|
|
49
|
-
role: 'system',
|
|
50
|
-
text: '',
|
|
51
|
-
tools: ['two ✓']
|
|
52
|
-
});
|
|
53
|
-
expect(merged).toHaveLength(2);
|
|
54
|
-
expect(merged[0]).toEqual({
|
|
55
|
-
kind: 'trail',
|
|
56
|
-
role: 'system',
|
|
57
|
-
text: '',
|
|
58
|
-
thinking: 'plan',
|
|
59
|
-
tools: ['one ✓', 'two ✓']
|
|
60
|
-
});
|
|
61
|
-
expect(merged[1]).toEqual({ kind: 'trail', role: 'system', text: '', thinking: 'more plan' });
|
|
62
|
-
});
|
|
63
|
-
it('collapses a chronological thinking/tool/thinking/tool stream into one shelf', () => {
|
|
64
|
-
const events = [
|
|
65
|
-
{ kind: 'trail', role: 'system', text: '', thinking: 'plan' },
|
|
66
|
-
{ kind: 'trail', role: 'system', text: '', tools: ['one ✓'] },
|
|
67
|
-
{ kind: 'trail', role: 'system', text: '', thinking: 'more plan' },
|
|
68
|
-
{ kind: 'trail', role: 'system', text: '', tools: ['two ✓'] },
|
|
69
|
-
{ kind: 'trail', role: 'system', text: '', tools: ['three ✓'] }
|
|
70
|
-
];
|
|
71
|
-
const reduced = events.reduce((acc, msg) => appendToolShelfMessage(acc, msg), []);
|
|
72
|
-
expect(reduced).toHaveLength(2);
|
|
73
|
-
expect(reduced[0]).toEqual({
|
|
74
|
-
kind: 'trail',
|
|
75
|
-
role: 'system',
|
|
76
|
-
text: '',
|
|
77
|
-
thinking: 'plan',
|
|
78
|
-
tools: ['one ✓', 'two ✓', 'three ✓']
|
|
79
|
-
});
|
|
80
|
-
expect(reduced[1]).toEqual({ kind: 'trail', role: 'system', text: '', thinking: 'more plan' });
|
|
81
|
-
});
|
|
82
|
-
it('starts a new shelf across assistant text boundaries', () => {
|
|
83
|
-
const merged = appendToolShelfMessage([
|
|
84
|
-
{ kind: 'trail', role: 'system', text: '', tools: ['one ✓'] },
|
|
85
|
-
{ role: 'assistant', text: 'done' }
|
|
86
|
-
], { kind: 'trail', role: 'system', text: '', tools: ['two ✓'] });
|
|
87
|
-
expect(merged).toHaveLength(3);
|
|
88
|
-
});
|
|
89
|
-
});
|