@varveai/adit-cli 0.2.1
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/LICENSE +21 -0
- package/dist/commands/cloud.d.ts +51 -0
- package/dist/commands/cloud.d.ts.map +1 -0
- package/dist/commands/cloud.js +430 -0
- package/dist/commands/cloud.js.map +1 -0
- package/dist/commands/config.d.ts +8 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +30 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/db.d.ts +17 -0
- package/dist/commands/db.d.ts.map +1 -0
- package/dist/commands/db.js +48 -0
- package/dist/commands/db.js.map +1 -0
- package/dist/commands/diff.d.ts +30 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +265 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/doctor.d.ts +15 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +265 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/export.d.ts +24 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +219 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/init.d.ts +12 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +137 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +20 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +110 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/perf.d.ts +19 -0
- package/dist/commands/perf.d.ts.map +1 -0
- package/dist/commands/perf.js +102 -0
- package/dist/commands/perf.js.map +1 -0
- package/dist/commands/plugin.d.ts +28 -0
- package/dist/commands/plugin.d.ts.map +1 -0
- package/dist/commands/plugin.js +516 -0
- package/dist/commands/plugin.js.map +1 -0
- package/dist/commands/project-link.d.ts +16 -0
- package/dist/commands/project-link.d.ts.map +1 -0
- package/dist/commands/project-link.js +143 -0
- package/dist/commands/project-link.js.map +1 -0
- package/dist/commands/resume.d.ts +28 -0
- package/dist/commands/resume.d.ts.map +1 -0
- package/dist/commands/resume.js +229 -0
- package/dist/commands/resume.js.map +1 -0
- package/dist/commands/revert.d.ts +30 -0
- package/dist/commands/revert.d.ts.map +1 -0
- package/dist/commands/revert.js +271 -0
- package/dist/commands/revert.js.map +1 -0
- package/dist/commands/search.d.ts +16 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +72 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/self-update.d.ts +12 -0
- package/dist/commands/self-update.d.ts.map +1 -0
- package/dist/commands/self-update.js +161 -0
- package/dist/commands/self-update.js.map +1 -0
- package/dist/commands/show.d.ts +5 -0
- package/dist/commands/show.d.ts.map +1 -0
- package/dist/commands/show.js +86 -0
- package/dist/commands/show.js.map +1 -0
- package/dist/commands/status.d.ts +11 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +237 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/task.d.ts +18 -0
- package/dist/commands/task.d.ts.map +1 -0
- package/dist/commands/task.js +131 -0
- package/dist/commands/task.js.map +1 -0
- package/dist/commands/transcript.d.ts +40 -0
- package/dist/commands/transcript.d.ts.map +1 -0
- package/dist/commands/transcript.js +275 -0
- package/dist/commands/transcript.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +385 -0
- package/dist/index.js.map +1 -0
- package/dist/tui/App.d.ts +8 -0
- package/dist/tui/App.d.ts.map +1 -0
- package/dist/tui/App.js +132 -0
- package/dist/tui/App.js.map +1 -0
- package/dist/tui/components/DiffView.d.ts +11 -0
- package/dist/tui/components/DiffView.d.ts.map +1 -0
- package/dist/tui/components/DiffView.js +29 -0
- package/dist/tui/components/DiffView.js.map +1 -0
- package/dist/tui/components/EventDetail.d.ts +11 -0
- package/dist/tui/components/EventDetail.d.ts.map +1 -0
- package/dist/tui/components/EventDetail.js +36 -0
- package/dist/tui/components/EventDetail.js.map +1 -0
- package/dist/tui/components/EventList.d.ts +15 -0
- package/dist/tui/components/EventList.d.ts.map +1 -0
- package/dist/tui/components/EventList.js +77 -0
- package/dist/tui/components/EventList.js.map +1 -0
- package/dist/tui/components/FilterBar.d.ts +12 -0
- package/dist/tui/components/FilterBar.d.ts.map +1 -0
- package/dist/tui/components/FilterBar.js +20 -0
- package/dist/tui/components/FilterBar.js.map +1 -0
- package/dist/tui/components/StatusBar.d.ts +16 -0
- package/dist/tui/components/StatusBar.d.ts.map +1 -0
- package/dist/tui/components/StatusBar.js +13 -0
- package/dist/tui/components/StatusBar.js.map +1 -0
- package/dist/tui/hooks/useKeyboard.d.ts +22 -0
- package/dist/tui/hooks/useKeyboard.d.ts.map +1 -0
- package/dist/tui/hooks/useKeyboard.js +64 -0
- package/dist/tui/hooks/useKeyboard.js.map +1 -0
- package/dist/tui/hooks/useTimeline.d.ts +31 -0
- package/dist/tui/hooks/useTimeline.d.ts.map +1 -0
- package/dist/tui/hooks/useTimeline.js +136 -0
- package/dist/tui/hooks/useTimeline.js.map +1 -0
- package/dist/tui/index.d.ts +5 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +10 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/screens/DiffScreen.d.ts +12 -0
- package/dist/tui/screens/DiffScreen.d.ts.map +1 -0
- package/dist/tui/screens/DiffScreen.js +25 -0
- package/dist/tui/screens/DiffScreen.js.map +1 -0
- package/dist/tui/screens/EnvScreen.d.ts +11 -0
- package/dist/tui/screens/EnvScreen.d.ts.map +1 -0
- package/dist/tui/screens/EnvScreen.js +25 -0
- package/dist/tui/screens/EnvScreen.js.map +1 -0
- package/dist/tui/screens/SearchScreen.d.ts +13 -0
- package/dist/tui/screens/SearchScreen.d.ts.map +1 -0
- package/dist/tui/screens/SearchScreen.js +56 -0
- package/dist/tui/screens/SearchScreen.js.map +1 -0
- package/dist/tui/screens/TimelineScreen.d.ts +19 -0
- package/dist/tui/screens/TimelineScreen.d.ts.map +1 -0
- package/dist/tui/screens/TimelineScreen.js +10 -0
- package/dist/tui/screens/TimelineScreen.js.map +1 -0
- package/dist/utils/format.d.ts +23 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +65 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/summary.d.ts +26 -0
- package/dist/utils/summary.d.ts.map +1 -0
- package/dist/utils/summary.js +87 -0
- package/dist/utils/summary.js.map +1 -0
- package/dist/version.d.ts +8 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +11 -0
- package/dist/version.js.map +1 -0
- package/package.json +48 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ADIT CLI — AI Development Intent Tracker
|
|
4
|
+
*
|
|
5
|
+
* The main command-line interface for inspecting and managing
|
|
6
|
+
* the ADIT timeline.
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from "commander";
|
|
9
|
+
import { initCommand } from "./commands/init.js";
|
|
10
|
+
import { listCommand } from "./commands/list.js";
|
|
11
|
+
import { showCommand } from "./commands/show.js";
|
|
12
|
+
import { revertCommand, interactiveRevertCommand, undoCommand } from "./commands/revert.js";
|
|
13
|
+
import { resumeCommand } from "./commands/resume.js";
|
|
14
|
+
import { searchCommand } from "./commands/search.js";
|
|
15
|
+
import { diffCommand, promptCommand, envCommand, envLatestCommand, envDiffCommand, envHistoryCommand, } from "./commands/diff.js";
|
|
16
|
+
import { doctorCommand } from "./commands/doctor.js";
|
|
17
|
+
import { exportCommand, exportSessionCommand } from "./commands/export.js";
|
|
18
|
+
import { statusCommand } from "./commands/status.js";
|
|
19
|
+
import { configCommand } from "./commands/config.js";
|
|
20
|
+
import { pluginInstallCommand, pluginUninstallCommand, pluginListCommand, pluginValidateCommand, } from "./commands/plugin.js";
|
|
21
|
+
import { cloudLoginCommand, cloudLogoutCommand, cloudSyncCommand, cloudStatusCommand, cloudResetCredentialsCommand, cloudAuthTokenCommand, } from "./commands/cloud.js";
|
|
22
|
+
import { dbClearEventsCommand } from "./commands/db.js";
|
|
23
|
+
import { transcriptEnableCommand, transcriptDisableCommand, transcriptStatusCommand, transcriptUploadCommand, transcriptResetCommand, } from "./commands/transcript.js";
|
|
24
|
+
import { perfCommand, perfClearCommand } from "./commands/perf.js";
|
|
25
|
+
import { projectLinkCliHandler, projectIntentCliHandler, } from "./commands/project-link.js";
|
|
26
|
+
import { taskCliHandler } from "./commands/task.js";
|
|
27
|
+
import { selfUpdateCommand } from "./commands/self-update.js";
|
|
28
|
+
import { launchTui } from "./tui/index.js";
|
|
29
|
+
import { CLI_VERSION } from "./version.js";
|
|
30
|
+
const program = new Command();
|
|
31
|
+
program
|
|
32
|
+
.name("adit")
|
|
33
|
+
.description("AI Development Intent Tracker — The Transparent Time Machine")
|
|
34
|
+
.version(CLI_VERSION);
|
|
35
|
+
program
|
|
36
|
+
.command("init")
|
|
37
|
+
.description("Initialize ADIT in the current project")
|
|
38
|
+
.option("-p, --platform <platform>", "Target platform (claude-code, opencode, cursor, copilot, codex)")
|
|
39
|
+
.option("-f, --force", "Force reinstall hooks (removes existing ADIT hooks first)")
|
|
40
|
+
.action((opts) => initCommand({ cwd: process.cwd(), platform: opts.platform, force: opts.force }));
|
|
41
|
+
program
|
|
42
|
+
.command("list")
|
|
43
|
+
.alias("ls")
|
|
44
|
+
.description("Show timeline entries")
|
|
45
|
+
.option("-l, --limit <n>", "Number of entries to show", "20")
|
|
46
|
+
.option("-a, --actor <actor>", "Filter by actor (assistant|user|tool)")
|
|
47
|
+
.option("-t, --type <type>", "Filter by event type")
|
|
48
|
+
.option("-c, --checkpoints", "Only show checkpoint events")
|
|
49
|
+
.option("-q, --query <text>", "Search by text")
|
|
50
|
+
.option("-e, --expand", "Show expanded summaries")
|
|
51
|
+
.option("-s, --sort <field>", "Sort by field: ACTOR or TIME (default: TIME)")
|
|
52
|
+
.option("--json", "Output as JSON")
|
|
53
|
+
.action((opts) => listCommand({
|
|
54
|
+
limit: parseInt(opts.limit, 10),
|
|
55
|
+
actor: opts.actor,
|
|
56
|
+
type: opts.type,
|
|
57
|
+
checkpoints: opts.checkpoints,
|
|
58
|
+
query: opts.query,
|
|
59
|
+
expand: opts.expand,
|
|
60
|
+
sort: opts.sort ? opts.sort.toUpperCase() : undefined,
|
|
61
|
+
json: opts.json,
|
|
62
|
+
}));
|
|
63
|
+
program
|
|
64
|
+
.command("show <id>")
|
|
65
|
+
.description("Show full event details")
|
|
66
|
+
.action((id) => showCommand(id));
|
|
67
|
+
// Search
|
|
68
|
+
program
|
|
69
|
+
.command("search <query>")
|
|
70
|
+
.description("Search events by text")
|
|
71
|
+
.option("-l, --limit <n>", "Max results", "20")
|
|
72
|
+
.option("-a, --actor <actor>", "Filter by actor")
|
|
73
|
+
.option("-t, --type <type>", "Filter by event type")
|
|
74
|
+
.option("--from <date>", "Start date (ISO 8601)")
|
|
75
|
+
.option("--to <date>", "End date (ISO 8601)")
|
|
76
|
+
.option("--branch <branch>", "Filter by git branch")
|
|
77
|
+
.option("--has-checkpoint", "Only events with checkpoints")
|
|
78
|
+
.option("--format <fmt>", "Output format (json)")
|
|
79
|
+
.option("--json", "Output as JSON")
|
|
80
|
+
.action((query, opts) => searchCommand(query, {
|
|
81
|
+
limit: parseInt(opts.limit, 10),
|
|
82
|
+
actor: opts.actor,
|
|
83
|
+
type: opts.type,
|
|
84
|
+
from: opts.from,
|
|
85
|
+
to: opts.to,
|
|
86
|
+
branch: opts.branch,
|
|
87
|
+
hasCheckpoint: opts.hasCheckpoint,
|
|
88
|
+
format: opts.format,
|
|
89
|
+
json: opts.json,
|
|
90
|
+
}));
|
|
91
|
+
program
|
|
92
|
+
.command("prompt <id>")
|
|
93
|
+
.description("Show prompt text for an event")
|
|
94
|
+
.option("-m, --max-chars <n>", "Max characters to show")
|
|
95
|
+
.option("-o, --offset <n>", "Character offset to start from")
|
|
96
|
+
.action((id, opts) => promptCommand(id, {
|
|
97
|
+
maxChars: opts.maxChars ? parseInt(opts.maxChars, 10) : undefined,
|
|
98
|
+
offset: opts.offset ? parseInt(opts.offset, 10) : undefined,
|
|
99
|
+
}));
|
|
100
|
+
program
|
|
101
|
+
.command("status")
|
|
102
|
+
.description("Show ADIT status for the current project")
|
|
103
|
+
.option("--json", "Output as JSON")
|
|
104
|
+
.action((opts) => statusCommand({ json: opts.json }));
|
|
105
|
+
program
|
|
106
|
+
.command("doctor")
|
|
107
|
+
.description("Validate ADIT installation health")
|
|
108
|
+
.option("--fix", "Attempt automatic fixes")
|
|
109
|
+
.option("--json", "Output as JSON")
|
|
110
|
+
.action((opts) => doctorCommand({ fix: opts.fix, json: opts.json }));
|
|
111
|
+
// Export commands
|
|
112
|
+
const exportCmd = program
|
|
113
|
+
.command("export")
|
|
114
|
+
.description("Export event data");
|
|
115
|
+
exportCmd
|
|
116
|
+
.command("event <id>")
|
|
117
|
+
.description("Export a single event bundle")
|
|
118
|
+
.option("-f, --format <fmt>", "Output format (json)", "json")
|
|
119
|
+
.option("-o, --output <path>", "Output file path")
|
|
120
|
+
.action((id, opts) => exportCommand(id, { format: opts.format, output: opts.output }));
|
|
121
|
+
exportCmd
|
|
122
|
+
.command("session [session-id]")
|
|
123
|
+
.description("Export entire session")
|
|
124
|
+
.option("-f, --format <fmt>", "Output format (json|jsonl|markdown)", "json")
|
|
125
|
+
.option("-o, --output <path>", "Output file path")
|
|
126
|
+
.option("--from <date>", "Start date filter")
|
|
127
|
+
.option("--to <date>", "End date filter")
|
|
128
|
+
.option("--include-diffs", "Include full diffs")
|
|
129
|
+
.option("--include-env", "Include environment snapshots")
|
|
130
|
+
.option("--gzip", "Compress output with gzip")
|
|
131
|
+
.action((sessionId, opts) => exportSessionCommand(sessionId, {
|
|
132
|
+
format: opts.format,
|
|
133
|
+
output: opts.output,
|
|
134
|
+
from: opts.from,
|
|
135
|
+
to: opts.to,
|
|
136
|
+
includeDiffs: opts.includeDiffs,
|
|
137
|
+
includeEnv: opts.includeEnv,
|
|
138
|
+
gzip: opts.gzip,
|
|
139
|
+
}));
|
|
140
|
+
// Config
|
|
141
|
+
program
|
|
142
|
+
.command("config")
|
|
143
|
+
.description("Show ADIT configuration")
|
|
144
|
+
.option("--json", "Output as JSON")
|
|
145
|
+
.action((opts) => configCommand({ json: opts.json }));
|
|
146
|
+
// Plugin management
|
|
147
|
+
const pluginCmd = program
|
|
148
|
+
.command("plugin")
|
|
149
|
+
.description("Manage platform plugin integrations");
|
|
150
|
+
pluginCmd
|
|
151
|
+
.command("install [platform]")
|
|
152
|
+
.description("Install ADIT hooks for a platform")
|
|
153
|
+
.option("--json", "Output as JSON")
|
|
154
|
+
.action((platform, opts) => pluginInstallCommand(platform, { json: opts.json }));
|
|
155
|
+
pluginCmd
|
|
156
|
+
.command("uninstall [platform]")
|
|
157
|
+
.description("Remove ADIT hooks for a platform")
|
|
158
|
+
.option("-a, --all", "Uninstall hooks for all installed platforms")
|
|
159
|
+
.option("--clean", "Also remove the .adit/ data directory")
|
|
160
|
+
.option("--json", "Output as JSON")
|
|
161
|
+
.action((platform, opts) => pluginUninstallCommand(platform, { json: opts.json, all: opts.all, clean: opts.clean }));
|
|
162
|
+
pluginCmd
|
|
163
|
+
.command("list")
|
|
164
|
+
.description("List available platform adapters")
|
|
165
|
+
.option("--json", "Output as JSON")
|
|
166
|
+
.action((opts) => pluginListCommand({ json: opts.json }));
|
|
167
|
+
pluginCmd
|
|
168
|
+
.command("validate [platform]")
|
|
169
|
+
.description("Validate platform plugin installation")
|
|
170
|
+
.option("--json", "Output as JSON")
|
|
171
|
+
.action((platform, opts) => pluginValidateCommand(platform, { json: opts.json }));
|
|
172
|
+
// Cloud sync
|
|
173
|
+
const cloudCmd = program
|
|
174
|
+
.command("cloud")
|
|
175
|
+
.description("Cloud sync commands");
|
|
176
|
+
cloudCmd
|
|
177
|
+
.command("login")
|
|
178
|
+
.description("Authenticate with adit-cloud via device code flow")
|
|
179
|
+
.option("-s, --server <url>", "Cloud server URL")
|
|
180
|
+
.action((opts) => cloudLoginCommand({ server: opts.server }));
|
|
181
|
+
cloudCmd
|
|
182
|
+
.command("logout")
|
|
183
|
+
.description("Clear stored cloud credentials")
|
|
184
|
+
.action(() => cloudLogoutCommand());
|
|
185
|
+
cloudCmd
|
|
186
|
+
.command("sync")
|
|
187
|
+
.description("Push unsynced records to cloud")
|
|
188
|
+
.option("--json", "Output as JSON")
|
|
189
|
+
.action((opts) => cloudSyncCommand({ json: opts.json }));
|
|
190
|
+
cloudCmd
|
|
191
|
+
.command("status")
|
|
192
|
+
.description("Show cloud sync status")
|
|
193
|
+
.option("--json", "Output as JSON")
|
|
194
|
+
.action((opts) => cloudStatusCommand({ json: opts.json }));
|
|
195
|
+
cloudCmd
|
|
196
|
+
.command("reset-credentials")
|
|
197
|
+
.description("Force-clear all credentials and sync state")
|
|
198
|
+
.option("-y, --yes", "Skip confirmation")
|
|
199
|
+
.action((opts) => cloudResetCredentialsCommand({ yes: opts.yes }));
|
|
200
|
+
cloudCmd
|
|
201
|
+
.command("auth-token <token>")
|
|
202
|
+
.description("Authenticate with a static JWT token")
|
|
203
|
+
.action((token) => cloudAuthTokenCommand(token));
|
|
204
|
+
// Transcript upload management (under cloud)
|
|
205
|
+
const transcriptCmd = cloudCmd
|
|
206
|
+
.command("transcript")
|
|
207
|
+
.description("Manage transcript upload to cloud");
|
|
208
|
+
transcriptCmd
|
|
209
|
+
.command("enable")
|
|
210
|
+
.description("Enable automatic transcript upload (default)")
|
|
211
|
+
.action(() => transcriptEnableCommand());
|
|
212
|
+
transcriptCmd
|
|
213
|
+
.command("disable")
|
|
214
|
+
.description("Disable automatic transcript upload")
|
|
215
|
+
.action(() => transcriptDisableCommand());
|
|
216
|
+
transcriptCmd
|
|
217
|
+
.command("status")
|
|
218
|
+
.description("Show transcript upload status")
|
|
219
|
+
.option("--json", "Output as JSON")
|
|
220
|
+
.action((opts) => transcriptStatusCommand({ json: opts.json }));
|
|
221
|
+
transcriptCmd
|
|
222
|
+
.command("upload")
|
|
223
|
+
.description("Manually trigger transcript uploads")
|
|
224
|
+
.option("--json", "Output as JSON")
|
|
225
|
+
.action((opts) => transcriptUploadCommand({ json: opts.json }));
|
|
226
|
+
transcriptCmd
|
|
227
|
+
.command("reset <id>")
|
|
228
|
+
.description("Reset a failed transcript for re-upload")
|
|
229
|
+
.option("--json", "Output as JSON")
|
|
230
|
+
.action((id, opts) => transcriptResetCommand(id, { json: opts.json }));
|
|
231
|
+
cloudCmd
|
|
232
|
+
.command("link")
|
|
233
|
+
.description("Link this project to adit-cloud")
|
|
234
|
+
.option("-f, --force", "Clear cache and re-link from scratch")
|
|
235
|
+
.option("--skip-docs", "Skip document upload")
|
|
236
|
+
.option("--skip-commits", "Skip commit history upload")
|
|
237
|
+
.option("--skip-qualify", "Skip document quality check")
|
|
238
|
+
.option("--dry-run", "Preview without uploading")
|
|
239
|
+
.option("--json", "Output result as JSON")
|
|
240
|
+
.action((opts) => projectLinkCliHandler({
|
|
241
|
+
force: opts.force,
|
|
242
|
+
skipDocs: opts.skipDocs,
|
|
243
|
+
skipCommits: opts.skipCommits,
|
|
244
|
+
skipQualify: opts.skipQualify,
|
|
245
|
+
dryRun: opts.dryRun,
|
|
246
|
+
json: opts.json,
|
|
247
|
+
}));
|
|
248
|
+
cloudCmd
|
|
249
|
+
.command("intent")
|
|
250
|
+
.description("List intents and tasks from connected project")
|
|
251
|
+
.option("--id <id>", "Show detailed intent with tasks")
|
|
252
|
+
.option("--state <state>", "Filter by intent state")
|
|
253
|
+
.option("--json", "Output as JSON")
|
|
254
|
+
.action((opts) => projectIntentCliHandler({
|
|
255
|
+
id: opts.id,
|
|
256
|
+
state: opts.state,
|
|
257
|
+
json: opts.json,
|
|
258
|
+
}));
|
|
259
|
+
cloudCmd
|
|
260
|
+
.command("task")
|
|
261
|
+
.argument("<intent-id>", "Intent ID containing tasks to update")
|
|
262
|
+
.description("Update task statuses in an intent")
|
|
263
|
+
.option("--status <status>", "Target status for tasks (pending, approved, in_progress, completed, rejected)", "completed")
|
|
264
|
+
.option("--task-id <task-id>", "Specific task ID to update (can be used multiple times)", (value, previous = []) => [...previous, value], [])
|
|
265
|
+
.option("--phase <number>", "Filter by phase number (1-99)")
|
|
266
|
+
.option("--feature-tag <tag>", "Filter by feature tag")
|
|
267
|
+
.option("--wave <number>", "Filter by wave number")
|
|
268
|
+
.option("--json", "Output as JSON")
|
|
269
|
+
.action((intentId, opts) => taskCliHandler(intentId, {
|
|
270
|
+
status: opts.status,
|
|
271
|
+
taskId: opts.taskId,
|
|
272
|
+
phase: opts.phase,
|
|
273
|
+
featureTag: opts.featureTag,
|
|
274
|
+
wave: opts.wave,
|
|
275
|
+
json: opts.json,
|
|
276
|
+
}));
|
|
277
|
+
// Database management
|
|
278
|
+
const dbCmd = program
|
|
279
|
+
.command("db")
|
|
280
|
+
.description("Database management commands");
|
|
281
|
+
dbCmd
|
|
282
|
+
.command("clear-events")
|
|
283
|
+
.description("Delete all local events, sessions, diffs, and env snapshots")
|
|
284
|
+
.option("-y, --yes", "Skip confirmation")
|
|
285
|
+
.option("--json", "Output as JSON")
|
|
286
|
+
.action((opts) => dbClearEventsCommand({ yes: opts.yes, json: opts.json }));
|
|
287
|
+
// Performance stats
|
|
288
|
+
const perfCmd = program
|
|
289
|
+
.command("perf")
|
|
290
|
+
.description("Performance stats for hook and git operations");
|
|
291
|
+
perfCmd
|
|
292
|
+
.command("stats")
|
|
293
|
+
.description("Show performance stats report")
|
|
294
|
+
.option("--from <date>", "Start date (YYYY-MM-DD)")
|
|
295
|
+
.option("--to <date>", "End date (YYYY-MM-DD)")
|
|
296
|
+
.option("-c, --category <cat>", "Filter by category (hook|git|snapshot|network)")
|
|
297
|
+
.option("--json", "Output as JSON")
|
|
298
|
+
.action((opts) => perfCommand({
|
|
299
|
+
from: opts.from,
|
|
300
|
+
to: opts.to,
|
|
301
|
+
category: opts.category,
|
|
302
|
+
json: opts.json,
|
|
303
|
+
}));
|
|
304
|
+
perfCmd
|
|
305
|
+
.command("clear")
|
|
306
|
+
.description("Clear all performance logs")
|
|
307
|
+
.option("--json", "Output as JSON")
|
|
308
|
+
.action((opts) => perfClearCommand({ json: opts.json }));
|
|
309
|
+
// Snapshot — git checkpoint features (revert, undo, diff, env)
|
|
310
|
+
const snapshotCmd = program
|
|
311
|
+
.command("snapshot")
|
|
312
|
+
.description("Git checkpoint snapshot commands (revert, undo, diff, env)");
|
|
313
|
+
snapshotCmd
|
|
314
|
+
.command("revert [id]")
|
|
315
|
+
.description("Revert working tree to a checkpoint (interactive picker if no ID given)")
|
|
316
|
+
.option("-y, --yes", "Skip confirmation")
|
|
317
|
+
.option("-l, --limit <n>", "Max checkpoints to show in picker", "20")
|
|
318
|
+
.action((id, opts) => {
|
|
319
|
+
if (id) {
|
|
320
|
+
revertCommand(id, { yes: opts.yes });
|
|
321
|
+
}
|
|
322
|
+
else {
|
|
323
|
+
interactiveRevertCommand({ yes: opts.yes, limit: parseInt(opts.limit, 10) });
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
snapshotCmd
|
|
327
|
+
.command("undo")
|
|
328
|
+
.description("Revert to parent of last checkpoint")
|
|
329
|
+
.option("-y, --yes", "Skip confirmation")
|
|
330
|
+
.action((opts) => undoCommand({ yes: opts.yes }));
|
|
331
|
+
snapshotCmd
|
|
332
|
+
.command("resume [branch]")
|
|
333
|
+
.description("Resume a session from the latest checkpoint on a branch")
|
|
334
|
+
.option("-y, --yes", "Skip confirmation and force-switch branches")
|
|
335
|
+
.action((branch, opts) => resumeCommand(branch, { yes: opts.yes }));
|
|
336
|
+
snapshotCmd
|
|
337
|
+
.command("diff <id>")
|
|
338
|
+
.description("Show diff for a checkpoint event")
|
|
339
|
+
.option("-n, --max-lines <n>", "Max lines to show")
|
|
340
|
+
.option("-o, --offset-lines <n>", "Skip first N lines")
|
|
341
|
+
.option("-f, --file <path>", "Filter by file path")
|
|
342
|
+
.action((id, opts) => diffCommand(id, {
|
|
343
|
+
maxLines: opts.maxLines ? parseInt(opts.maxLines, 10) : undefined,
|
|
344
|
+
offsetLines: opts.offsetLines
|
|
345
|
+
? parseInt(opts.offsetLines, 10)
|
|
346
|
+
: undefined,
|
|
347
|
+
file: opts.file,
|
|
348
|
+
}));
|
|
349
|
+
// Environment snapshot commands (under snapshot)
|
|
350
|
+
const envCmd = snapshotCmd
|
|
351
|
+
.command("env")
|
|
352
|
+
.description("Environment snapshot commands");
|
|
353
|
+
envCmd
|
|
354
|
+
.command("show <id>")
|
|
355
|
+
.description("Show environment snapshot for an event")
|
|
356
|
+
.action((id) => envCommand(id));
|
|
357
|
+
envCmd
|
|
358
|
+
.command("latest")
|
|
359
|
+
.description("Show the most recent environment snapshot")
|
|
360
|
+
.option("--json", "Output as JSON")
|
|
361
|
+
.action((opts) => envLatestCommand({ json: opts.json }));
|
|
362
|
+
envCmd
|
|
363
|
+
.command("diff <id1> <id2>")
|
|
364
|
+
.description("Compare two environment snapshots")
|
|
365
|
+
.option("--json", "Output as JSON")
|
|
366
|
+
.action((id1, id2, opts) => envDiffCommand(id1, id2, { json: opts.json }));
|
|
367
|
+
envCmd
|
|
368
|
+
.command("history")
|
|
369
|
+
.description("List environment snapshot history")
|
|
370
|
+
.option("-l, --limit <n>", "Max results", "20")
|
|
371
|
+
.option("--json", "Output as JSON")
|
|
372
|
+
.action((opts) => envHistoryCommand({ limit: parseInt(opts.limit, 10), json: opts.json }));
|
|
373
|
+
// Self-update
|
|
374
|
+
program
|
|
375
|
+
.command("self-update")
|
|
376
|
+
.description("Update ADIT to the latest version")
|
|
377
|
+
.option("-c, --check", "Check for updates without installing")
|
|
378
|
+
.action((opts) => selfUpdateCommand({ check: opts.check }));
|
|
379
|
+
// TUI — interactive terminal interface
|
|
380
|
+
program
|
|
381
|
+
.command("tui")
|
|
382
|
+
.description("Launch the interactive terminal UI")
|
|
383
|
+
.action(() => launchTui());
|
|
384
|
+
program.parse();
|
|
385
|
+
//# sourceMappingURL=index.js.map
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAa9D,wBAAgB,GAAG,IAAI,KAAK,CAAC,YAAY,CA2PxC"}
|
package/dist/tui/App.js
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Root TUI application component.
|
|
4
|
+
*
|
|
5
|
+
* Routes between screens and manages global state.
|
|
6
|
+
*/
|
|
7
|
+
import { useState, useCallback, useMemo } from "react";
|
|
8
|
+
import { Box, Text, useApp, useStdout } from "ink";
|
|
9
|
+
import Spinner from "ink-spinner";
|
|
10
|
+
import { useTimeline } from "./hooks/useTimeline.js";
|
|
11
|
+
import { useKeyboard } from "./hooks/useKeyboard.js";
|
|
12
|
+
import { StatusBar } from "./components/StatusBar.js";
|
|
13
|
+
import { TimelineScreen } from "./screens/TimelineScreen.js";
|
|
14
|
+
import { DiffScreen } from "./screens/DiffScreen.js";
|
|
15
|
+
import { SearchScreen } from "./screens/SearchScreen.js";
|
|
16
|
+
import { EnvScreen } from "./screens/EnvScreen.js";
|
|
17
|
+
import { sortEvents } from "../commands/list.js";
|
|
18
|
+
export function App() {
|
|
19
|
+
const { exit } = useApp();
|
|
20
|
+
const { stdout } = useStdout();
|
|
21
|
+
const termHeight = stdout?.rows ?? 24;
|
|
22
|
+
const [screen, setScreen] = useState("timeline");
|
|
23
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
24
|
+
const [showFilters, setShowFilters] = useState(false);
|
|
25
|
+
const [envSnapshot, setEnvSnapshot] = useState(null);
|
|
26
|
+
const [sortField, setSortField] = useState("TIME");
|
|
27
|
+
const SORT_CYCLE = ["TIME", "ACTOR"];
|
|
28
|
+
const { state, filters, setFilters, selectEvent, getEventDiff, getEnvSnapshot, } = useTimeline();
|
|
29
|
+
const events = useMemo(() => sortEvents(state.events, sortField), [state.events, sortField]);
|
|
30
|
+
// Ensure selectedIndex stays in bounds
|
|
31
|
+
const safeIndex = useMemo(() => Math.min(selectedIndex, Math.max(0, events.length - 1)), [selectedIndex, events.length]);
|
|
32
|
+
const selectedEvent = events[safeIndex] ?? null;
|
|
33
|
+
const navigateUp = useCallback(() => {
|
|
34
|
+
setSelectedIndex((i) => Math.max(0, i - 1));
|
|
35
|
+
}, []);
|
|
36
|
+
const navigateDown = useCallback(() => {
|
|
37
|
+
setSelectedIndex((i) => Math.min(events.length - 1, i + 1));
|
|
38
|
+
}, [events.length]);
|
|
39
|
+
const handleSelect = useCallback(() => {
|
|
40
|
+
if (selectedEvent) {
|
|
41
|
+
selectEvent(selectedEvent.id);
|
|
42
|
+
}
|
|
43
|
+
}, [selectedEvent, selectEvent]);
|
|
44
|
+
const handleShowDiff = useCallback(() => {
|
|
45
|
+
if (selectedEvent) {
|
|
46
|
+
selectEvent(selectedEvent.id);
|
|
47
|
+
setScreen("diff");
|
|
48
|
+
}
|
|
49
|
+
}, [selectedEvent, selectEvent]);
|
|
50
|
+
const handleShowEnv = useCallback(() => {
|
|
51
|
+
const snap = getEnvSnapshot();
|
|
52
|
+
setEnvSnapshot(snap);
|
|
53
|
+
setScreen("env");
|
|
54
|
+
}, [getEnvSnapshot]);
|
|
55
|
+
const handleSearch = useCallback(() => {
|
|
56
|
+
setScreen("search");
|
|
57
|
+
}, []);
|
|
58
|
+
const handleFilter = useCallback(() => {
|
|
59
|
+
setShowFilters((v) => !v);
|
|
60
|
+
}, []);
|
|
61
|
+
const handleSort = useCallback(() => {
|
|
62
|
+
setSortField((current) => {
|
|
63
|
+
const idx = SORT_CYCLE.indexOf(current);
|
|
64
|
+
return SORT_CYCLE[(idx + 1) % SORT_CYCLE.length];
|
|
65
|
+
});
|
|
66
|
+
}, []);
|
|
67
|
+
const handleBack = useCallback(() => {
|
|
68
|
+
if (screen !== "timeline") {
|
|
69
|
+
setScreen("timeline");
|
|
70
|
+
// Clear search filter when leaving search
|
|
71
|
+
if (screen === "search") {
|
|
72
|
+
setFilters({});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, [screen, setFilters]);
|
|
76
|
+
const handleHelp = useCallback(() => {
|
|
77
|
+
setScreen(screen === "help" ? "timeline" : "help");
|
|
78
|
+
}, [screen]);
|
|
79
|
+
const handleQuit = useCallback(() => {
|
|
80
|
+
exit();
|
|
81
|
+
}, [exit]);
|
|
82
|
+
const handleSearchSubmit = useCallback((query) => {
|
|
83
|
+
setFilters({ ...filters, searchQuery: query });
|
|
84
|
+
}, [filters, setFilters]);
|
|
85
|
+
useKeyboard({
|
|
86
|
+
onNavigateUp: navigateUp,
|
|
87
|
+
onNavigateDown: navigateDown,
|
|
88
|
+
onSelect: handleSelect,
|
|
89
|
+
onShowDiff: handleShowDiff,
|
|
90
|
+
onShowPrompt: handleSelect,
|
|
91
|
+
onShowEnv: handleShowEnv,
|
|
92
|
+
onSearch: handleSearch,
|
|
93
|
+
onFilter: handleFilter,
|
|
94
|
+
onSort: handleSort,
|
|
95
|
+
onHelp: handleHelp,
|
|
96
|
+
onBack: handleBack,
|
|
97
|
+
onQuit: handleQuit,
|
|
98
|
+
}, screen === "timeline" || screen === "diff" || screen === "env" || screen === "help");
|
|
99
|
+
// Header
|
|
100
|
+
const header = (_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", width: "100%", paddingX: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: "ADIT \u2014 AI Development Intent Tracker" }), state.session?.id && (_jsxs(Text, { dimColor: true, children: ["[", state.session.platform, "]", " ", state.session.id.substring(0, 10)] }))] }));
|
|
101
|
+
// Loading state
|
|
102
|
+
if (state.loading) {
|
|
103
|
+
return (_jsxs(Box, { flexDirection: "column", width: "100%", children: [header, _jsxs(Box, { paddingX: 1, children: [_jsx(Spinner, { type: "dots" }), _jsx(Text, { children: " Loading timeline..." })] })] }));
|
|
104
|
+
}
|
|
105
|
+
// Error state
|
|
106
|
+
if (state.error) {
|
|
107
|
+
return (_jsxs(Box, { flexDirection: "column", width: "100%", children: [header, _jsx(Box, { paddingX: 1, children: _jsxs(Text, { color: "red", children: ["Error: ", state.error] }) }), _jsx(Box, { paddingX: 1, children: _jsx(Text, { dimColor: true, children: "Try running \"adit init\" first. Press q to quit." }) })] }));
|
|
108
|
+
}
|
|
109
|
+
// Content height = terminal - header (1) - status bar (1) - borders (1)
|
|
110
|
+
const contentHeight = termHeight - 3;
|
|
111
|
+
let content;
|
|
112
|
+
switch (screen) {
|
|
113
|
+
case "diff":
|
|
114
|
+
content = (_jsx(DiffScreen, { event: selectedEvent, getDiff: getEventDiff }));
|
|
115
|
+
break;
|
|
116
|
+
case "search":
|
|
117
|
+
content = (_jsx(SearchScreen, { onSearch: handleSearchSubmit, events: events, selectedIndex: safeIndex }));
|
|
118
|
+
break;
|
|
119
|
+
case "env":
|
|
120
|
+
content = _jsx(EnvScreen, { snapshot: envSnapshot });
|
|
121
|
+
break;
|
|
122
|
+
case "help":
|
|
123
|
+
content = (_jsxs(Box, { flexDirection: "column", paddingX: 1, children: [_jsx(Text, { bold: true, children: "Keybindings" }), _jsx(Text, { dimColor: true, children: "─".repeat(30) }), _jsxs(Text, { children: ["j/k or \u2191/\u2193", " ", "Navigate events (detail updates live)"] }), _jsxs(Text, { children: ["d", " ", "Show diff for checkpoint"] }), _jsxs(Text, { children: ["p", " ", "Show prompt text"] }), _jsxs(Text, { children: ["e", " ", "Show environment snapshot"] }), _jsxs(Text, { children: ["/", " ", "Open search"] }), _jsxs(Text, { children: ["f", " ", "Toggle filter panel"] }), _jsxs(Text, { children: ["s", " ", "Cycle sort (TIME\u2192ACTOR)"] }), _jsxs(Text, { children: ["Esc / b", " ", "Go back"] }), _jsxs(Text, { children: ["q", " ", "Quit"] }), _jsxs(Text, { children: ["?", " ", "Toggle this help"] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Press ? or Esc to close" }) })] }));
|
|
124
|
+
break;
|
|
125
|
+
case "timeline":
|
|
126
|
+
default:
|
|
127
|
+
content = (_jsx(TimelineScreen, { events: events, selectedIndex: safeIndex, selectedEvent: selectedEvent, filters: filters, showFilters: showFilters, sortField: sortField, height: contentHeight }));
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
return (_jsxs(Box, { flexDirection: "column", width: "100%", height: termHeight, children: [header, _jsx(Box, { flexDirection: "column", flexGrow: 1, children: content }), _jsx(StatusBar, { session: state.session, eventCount: state.totalCount, screen: screen, sortField: sortField })] }));
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=App.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAe,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAkB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,MA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A2B,EACjD,MAAC,IAAI,oBAAG,cAAc,oCAA+B,EACrD,MAAC,IAAI,0BAAS,QAAQ,eAAe,EACrC,MAAC,IAAI,oBAAG,cAAc,YAAY,EAClC,MAAC,IAAI,oBAAG,cAAc,wBAAwB,EAC9C,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,QAAQ,8CAA+B,GACzC,IACF,CACP,CAAC;YACF,MAAM;QAER,KAAK,UAAU,CAAC;QAChB;YACE,OAAO,GAAG,CACR,KAAC,cAAc,IACb,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,SAAS,EACxB,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,aAAa,GACrB,CACH,CAAC;YACF,MAAM;IACV,CAAC;IAED,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAE,UAAU,aACxD,MAAM,EACP,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,YACpC,OAAO,GACJ,EACN,KAAC,SAAS,IACR,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,GACpB,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colored diff output component.
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
interface DiffViewProps {
|
|
6
|
+
diffText: string | null;
|
|
7
|
+
title?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function DiffView({ diffText, title, }: DiffViewProps): React.ReactElement;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=DiffView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiffView.d.ts","sourceRoot":"","sources":["../../../src/tui/components/DiffView.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,KAAK,GACN,EAAE,aAAa,GAAG,KAAK,CAAC,YAAY,CAwCpC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
export function DiffView({ diffText, title, }) {
|
|
4
|
+
if (!diffText) {
|
|
5
|
+
return (_jsx(Box, { flexDirection: "column", paddingX: 1, children: _jsx(Text, { dimColor: true, children: "No diff available" }) }));
|
|
6
|
+
}
|
|
7
|
+
const lines = diffText.split("\n");
|
|
8
|
+
return (_jsxs(Box, { flexDirection: "column", paddingX: 1, children: [title && (_jsx(Text, { bold: true, children: title })), lines.map((line, idx) => {
|
|
9
|
+
let color;
|
|
10
|
+
let dimColor = false;
|
|
11
|
+
if (line.startsWith("+++") || line.startsWith("---")) {
|
|
12
|
+
color = "cyan";
|
|
13
|
+
}
|
|
14
|
+
else if (line.startsWith("+")) {
|
|
15
|
+
color = "green";
|
|
16
|
+
}
|
|
17
|
+
else if (line.startsWith("-")) {
|
|
18
|
+
color = "red";
|
|
19
|
+
}
|
|
20
|
+
else if (line.startsWith("@@")) {
|
|
21
|
+
color = "yellow";
|
|
22
|
+
}
|
|
23
|
+
else if (line.startsWith("diff ") || line.startsWith("index ")) {
|
|
24
|
+
dimColor = true;
|
|
25
|
+
}
|
|
26
|
+
return (_jsx(Text, { color: color, dimColor: dimColor, wrap: "truncate", children: line }, idx));
|
|
27
|
+
})] }));
|
|
28
|
+
}
|
|
29
|
+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QAAQ,CAAC;gBACnB,CAAC;qBAAM,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;oBACjE,QAAQ,GAAG,IAAI,CAAC;gBAClB,CAAC;gBAED,OAAO,CACL,KAAC,IAAI,IAAW,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAC,UAAU,YAC9D,IAAI,IADI,GAAG,CAEP,CACR,CAAC;YACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event detail panel — shows full details of the selected event.
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { type AditEvent } from "@varveai/adit-core";
|
|
6
|
+
interface EventDetailProps {
|
|
7
|
+
event: AditEvent | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function EventDetail({ event, }: EventDetailProps): React.ReactElement;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=EventDetail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventDetail.d.ts","sourceRoot":"","sources":["../../../src/tui/components/EventDetail.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAA2C,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE7F,UAAU,gBAAgB;IACxB,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB;AAyBD,wBAAgB,WAAW,CAAC,EAC1B,KAAK,GACN,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAmMvC"}
|