@pellux/goodvibes-tui 0.28.0 → 1.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.
Files changed (144) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/src/core/conversation-line-cache.ts +432 -0
  5. package/src/core/conversation-rendering.ts +11 -3
  6. package/src/core/conversation.ts +50 -4
  7. package/src/input/commands/cost-runtime.ts +49 -0
  8. package/src/input/commands/operator-runtime.ts +5 -1
  9. package/src/input/commands.ts +2 -0
  10. package/src/input/handler-content-actions.ts +8 -3
  11. package/src/input/handler-feed-routes.ts +12 -35
  12. package/src/input/handler-feed.ts +4 -8
  13. package/src/input/handler-shortcuts.ts +51 -0
  14. package/src/input/handler.ts +43 -6
  15. package/src/input/input-history.ts +17 -4
  16. package/src/input/keybindings.ts +48 -8
  17. package/src/input/panel-integration-actions.ts +107 -1
  18. package/src/main.ts +19 -11
  19. package/src/panels/agent-inspector-panel.ts +125 -36
  20. package/src/panels/agent-inspector-shared.ts +144 -0
  21. package/src/panels/approval-panel.ts +67 -16
  22. package/src/panels/automation-control-panel.ts +368 -124
  23. package/src/panels/base-panel.ts +1 -1
  24. package/src/panels/builtin/agent.ts +28 -37
  25. package/src/panels/builtin/development.ts +40 -32
  26. package/src/panels/builtin/knowledge.ts +15 -6
  27. package/src/panels/builtin/operations.ts +178 -117
  28. package/src/panels/builtin/session.ts +35 -9
  29. package/src/panels/builtin/shared.ts +98 -6
  30. package/src/panels/cockpit-panel.ts +232 -73
  31. package/src/panels/communication-panel.ts +58 -20
  32. package/src/panels/confirm-state.ts +8 -1
  33. package/src/panels/control-plane-panel.ts +351 -118
  34. package/src/panels/cost-tracker-panel.ts +165 -7
  35. package/src/panels/debug-panel.ts +312 -159
  36. package/src/panels/diff-panel.ts +209 -57
  37. package/src/panels/docs-panel.ts +152 -66
  38. package/src/panels/eval-panel.ts +220 -42
  39. package/src/panels/file-explorer-panel.ts +202 -122
  40. package/src/panels/file-preview-panel.ts +132 -57
  41. package/src/panels/git-panel.ts +310 -129
  42. package/src/panels/hooks-panel.ts +150 -22
  43. package/src/panels/incident-review-panel.ts +223 -35
  44. package/src/panels/index.ts +0 -4
  45. package/src/panels/intelligence-panel.ts +212 -86
  46. package/src/panels/knowledge-graph-panel.ts +461 -101
  47. package/src/panels/local-auth-panel.ts +240 -28
  48. package/src/panels/marketplace-panel.ts +193 -26
  49. package/src/panels/memory-panel.ts +78 -77
  50. package/src/panels/ops-control-panel.ts +146 -29
  51. package/src/panels/ops-strategy-panel.ts +72 -4
  52. package/src/panels/orchestration-panel.ts +231 -69
  53. package/src/panels/panel-list-panel.ts +154 -131
  54. package/src/panels/panel-manager.ts +97 -9
  55. package/src/panels/plan-dashboard-panel.ts +333 -17
  56. package/src/panels/plugins-panel.ts +184 -29
  57. package/src/panels/policy-panel.ts +210 -38
  58. package/src/panels/polish-core.ts +7 -2
  59. package/src/panels/polish.ts +23 -4
  60. package/src/panels/project-planning-answer-actions.ts +134 -0
  61. package/src/panels/project-planning-panel.ts +62 -113
  62. package/src/panels/provider-health-panel.ts +434 -518
  63. package/src/panels/provider-health-routes.ts +203 -0
  64. package/src/panels/provider-health-tracker.ts +194 -6
  65. package/src/panels/provider-health-views.ts +560 -0
  66. package/src/panels/qr-panel.ts +116 -30
  67. package/src/panels/remote-panel.ts +114 -36
  68. package/src/panels/routes-panel.ts +63 -22
  69. package/src/panels/sandbox-panel.ts +174 -42
  70. package/src/panels/scrollable-list-panel.ts +19 -135
  71. package/src/panels/security-panel.ts +133 -33
  72. package/src/panels/services-panel.ts +116 -64
  73. package/src/panels/session-browser-panel.ts +73 -2
  74. package/src/panels/session-maintenance.ts +4 -122
  75. package/src/panels/settings-sync-panel.ts +335 -72
  76. package/src/panels/skills-panel.ts +157 -89
  77. package/src/panels/subscription-panel.ts +86 -33
  78. package/src/panels/symbol-outline-panel.ts +248 -108
  79. package/src/panels/system-messages-panel.ts +114 -13
  80. package/src/panels/tasks-panel.ts +326 -139
  81. package/src/panels/thinking-panel.ts +43 -10
  82. package/src/panels/token-budget-panel.ts +194 -18
  83. package/src/panels/tool-inspector-panel.ts +144 -34
  84. package/src/panels/types.ts +40 -4
  85. package/src/panels/work-plan-panel.ts +280 -17
  86. package/src/panels/worktree-panel.ts +175 -42
  87. package/src/panels/wrfc-panel.ts +116 -24
  88. package/src/renderer/agent-detail-modal.ts +37 -8
  89. package/src/renderer/code-block.ts +58 -28
  90. package/src/renderer/context-inspector.ts +3 -6
  91. package/src/renderer/conversation-overlays.ts +25 -11
  92. package/src/renderer/conversation-surface.ts +1 -21
  93. package/src/renderer/diff-view.ts +6 -4
  94. package/src/renderer/footer-tips.ts +41 -0
  95. package/src/renderer/fullscreen-primitives.ts +23 -17
  96. package/src/renderer/fullscreen-workspace.ts +2 -7
  97. package/src/renderer/help-overlay.ts +91 -14
  98. package/src/renderer/hint-grammar.ts +52 -0
  99. package/src/renderer/history-search-overlay.ts +10 -16
  100. package/src/renderer/layout.ts +7 -7
  101. package/src/renderer/markdown.ts +9 -1
  102. package/src/renderer/modal-factory.ts +23 -15
  103. package/src/renderer/model-picker-overlay.ts +8 -485
  104. package/src/renderer/model-workspace.ts +9 -24
  105. package/src/renderer/overlay-box.ts +23 -19
  106. package/src/renderer/process-indicator.ts +15 -25
  107. package/src/renderer/profile-picker-modal.ts +13 -14
  108. package/src/renderer/prompt-content-width.ts +16 -0
  109. package/src/renderer/search-overlay.ts +27 -6
  110. package/src/renderer/selection-modal-overlay.ts +3 -1
  111. package/src/renderer/semantic-diff.ts +1 -1
  112. package/src/renderer/session-picker-modal.ts +6 -4
  113. package/src/renderer/settings-modal-helpers.ts +10 -34
  114. package/src/renderer/settings-modal.ts +70 -10
  115. package/src/renderer/shell-surface.ts +54 -15
  116. package/src/renderer/status-glyphs.ts +11 -9
  117. package/src/renderer/surface-layout.ts +0 -12
  118. package/src/renderer/term-caps.ts +1 -1
  119. package/src/renderer/theme.ts +60 -3
  120. package/src/renderer/tool-call.ts +6 -20
  121. package/src/renderer/ui-factory.ts +48 -37
  122. package/src/renderer/ui-primitives.ts +41 -3
  123. package/src/runtime/bootstrap-shell.ts +35 -18
  124. package/src/runtime/diagnostics/panels/index.ts +0 -3
  125. package/src/runtime/render-scheduler.ts +80 -0
  126. package/src/shell/ui-openers.ts +14 -22
  127. package/src/utils/format-duration.ts +2 -2
  128. package/src/utils/splash-lines.ts +54 -5
  129. package/src/version.ts +1 -1
  130. package/src/work-plans/work-plan-store.ts +13 -0
  131. package/src/panels/agent-logs-panel.ts +0 -635
  132. package/src/panels/agent-logs-shared.ts +0 -129
  133. package/src/panels/context-visualizer-panel.ts +0 -238
  134. package/src/panels/forensics-panel.ts +0 -378
  135. package/src/panels/provider-account-snapshot.ts +0 -259
  136. package/src/panels/provider-accounts-panel.ts +0 -255
  137. package/src/panels/provider-stats-panel.ts +0 -391
  138. package/src/panels/schedule-panel.ts +0 -365
  139. package/src/panels/watchers-panel.ts +0 -213
  140. package/src/renderer/file-tree.ts +0 -153
  141. package/src/renderer/progress.ts +0 -99
  142. package/src/renderer/status-token.ts +0 -67
  143. package/src/runtime/diagnostics/panels/panel-resources.ts +0 -118
  144. package/src/runtime/diagnostics/panels/policy.ts +0 -177
@@ -1,4 +1,4 @@
1
- import { center, getDisplayWidth } from './terminal-width.ts';
1
+ import { center, getDisplayWidth, truncateDisplay } from './terminal-width.ts';
2
2
  import { VERSION } from '../version.ts';
3
3
 
4
4
  const ART_LINES = [
@@ -20,27 +20,76 @@ const SEPARATOR = '━'.repeat(ART_W);
20
20
  */
21
21
  const TAGLINE = '[ good vibes ・ A I ・ いい雰囲気 ]';
22
22
 
23
- const VERSION_LINE = ` ✦ v${VERSION} █ terminal AI assistant █ 自動コード  ✦`;
23
+ const versionLine = (version: string) =>
24
+ ` ✦ v${version} █ terminal AI assistant █ 自動コード  ✦`;
25
+
26
+ /** Fixed hint line — the three primary shell entry points. */
27
+ const HINT_LINE = 'Ctrl+P panels / ? help / F2 processes';
24
28
 
25
29
  export interface SplashOptions {
26
30
  workingDir?: string;
27
31
  model?: string;
28
32
  provider?: string;
29
33
  toolCount?: number;
34
+ /**
35
+ * Session id of the most recent session, as resolved by readLastSessionPointer.
36
+ * When present, the splash advertises a resume affordance.
37
+ */
38
+ lastSessionId?: string;
39
+ /**
40
+ * Version string rendered on the splash's version line. Defaults to the
41
+ * build VERSION; injectable so the golden-frame tests can pin a fixture —
42
+ * the version's display width shifts the line's centering, so goldens tied
43
+ * to the live VERSION break on every release bump (v1.0.0 release failure).
44
+ */
45
+ version?: string;
46
+ }
47
+
48
+ /** Collapse a $HOME-prefixed working directory to a leading `~`. */
49
+ function collapseHome(dir: string): string {
50
+ const home = typeof process !== 'undefined' ? process.env.HOME ?? '' : '';
51
+ return home && dir.startsWith(home) ? '~' + dir.slice(home.length) : dir;
52
+ }
53
+
54
+ /** Center a meta line, truncating first so it never overflows the terminal width. */
55
+ function metaLine(text: string, columns: number): string {
56
+ return center(truncateDisplay(text, Math.max(0, columns)), columns);
30
57
  }
31
58
 
32
59
  export function getSplashLines(columns: number, opts: SplashOptions = {}): string[] {
33
- const splashHint = 'start chatting or type /help for commands';
34
60
  const lines: string[] = [
35
61
  center(TOP_BORDER, columns),
36
62
  ...ART_LINES.map((line) => center(line, columns)),
37
63
  center(SEPARATOR, columns),
38
64
  center(TAGLINE, columns),
39
- center(VERSION_LINE, columns),
65
+ center(versionLine(opts.version ?? VERSION), columns),
40
66
  '',
41
67
  ];
42
68
 
43
- lines.push(center(splashHint, columns));
69
+ // Live session context — real state pulled from SplashOptions rather than a
70
+ // static "/help" signpost: model (provider) and tool count on one line, cwd
71
+ // on the next.
72
+ const contextBits: string[] = [];
73
+ if (opts.model) {
74
+ contextBits.push(opts.provider ? `${opts.model} (${opts.provider})` : opts.model);
75
+ }
76
+ if (typeof opts.toolCount === 'number') {
77
+ contextBits.push(`${opts.toolCount} tool${opts.toolCount === 1 ? '' : 's'}`);
78
+ }
79
+ if (contextBits.length > 0) {
80
+ lines.push(metaLine(contextBits.join(' · '), columns));
81
+ }
82
+ if (opts.workingDir) {
83
+ lines.push(metaLine(collapseHome(opts.workingDir), columns));
84
+ }
85
+
86
+ // Last-session resume pointer (readLastSessionPointer result), when recorded.
87
+ if (opts.lastSessionId) {
88
+ lines.push(metaLine(`↩ resume last session — /sessions resume ${opts.lastSessionId}`, columns));
89
+ }
90
+
91
+ lines.push('');
92
+ lines.push(metaLine(HINT_LINE, columns));
44
93
 
45
94
  return lines;
46
95
  }
package/src/version.ts CHANGED
@@ -6,7 +6,7 @@ import { join } from 'node:path';
6
6
  // The prebuild script updates the fallback value before compilation.
7
7
  // Uses import.meta.dir (Bun) to locate package.json relative to this file,
8
8
  // which is correct regardless of the process working directory.
9
- let _version = '0.28.0';
9
+ let _version = '1.0.0';
10
10
  try {
11
11
  const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8'));
12
12
  _version = pkg.version ?? _version;
@@ -267,6 +267,19 @@ export class WorkPlanStore {
267
267
  return removed;
268
268
  }
269
269
 
270
+ /**
271
+ * Writes the current plan's `toMarkdown()` output to a sibling `.md` file
272
+ * next to the JSON store file, so the checklist can be opened outside the
273
+ * TUI. Returns the written path alongside the markdown that was written.
274
+ */
275
+ exportMarkdown(): { readonly path: string; readonly markdown: string } {
276
+ const plan = this.readPlan();
277
+ const markdown = this.toMarkdown(plan);
278
+ const path = this.filePath.replace(/\.json$/, '.md');
279
+ atomicWriteFileSync(path, `${markdown}\n`, { mkdirp: true });
280
+ return { path, markdown };
281
+ }
282
+
270
283
  toMarkdown(plan: WorkPlan = this.readPlan()): string {
271
284
  const lines = [
272
285
  `# ${plan.title}`,