gencode-ai 0.1.2 → 0.2.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 (180) hide show
  1. package/README.md +15 -17
  2. package/dist/agent/agent.d.ts +43 -0
  3. package/dist/agent/agent.d.ts.map +1 -1
  4. package/dist/agent/agent.js +107 -4
  5. package/dist/agent/agent.js.map +1 -1
  6. package/dist/agent/index.d.ts +1 -0
  7. package/dist/agent/index.d.ts.map +1 -1
  8. package/dist/agent/types.d.ts +20 -1
  9. package/dist/agent/types.d.ts.map +1 -1
  10. package/dist/checkpointing/checkpoint-manager.d.ts +87 -0
  11. package/dist/checkpointing/checkpoint-manager.d.ts.map +1 -0
  12. package/dist/checkpointing/checkpoint-manager.js +281 -0
  13. package/dist/checkpointing/checkpoint-manager.js.map +1 -0
  14. package/dist/checkpointing/index.d.ts +29 -0
  15. package/dist/checkpointing/index.d.ts.map +1 -0
  16. package/dist/checkpointing/index.js +29 -0
  17. package/dist/checkpointing/index.js.map +1 -0
  18. package/dist/checkpointing/types.d.ts +98 -0
  19. package/dist/checkpointing/types.d.ts.map +1 -0
  20. package/dist/checkpointing/types.js +7 -0
  21. package/dist/checkpointing/types.js.map +1 -0
  22. package/dist/cli/components/App.d.ts.map +1 -1
  23. package/dist/cli/components/App.js +193 -7
  24. package/dist/cli/components/App.js.map +1 -1
  25. package/dist/cli/components/CommandSuggestions.d.ts.map +1 -1
  26. package/dist/cli/components/CommandSuggestions.js +5 -0
  27. package/dist/cli/components/CommandSuggestions.js.map +1 -1
  28. package/dist/cli/components/Messages.d.ts +7 -1
  29. package/dist/cli/components/Messages.d.ts.map +1 -1
  30. package/dist/cli/components/Messages.js +28 -2
  31. package/dist/cli/components/Messages.js.map +1 -1
  32. package/dist/cli/components/ModeIndicator.d.ts +42 -0
  33. package/dist/cli/components/ModeIndicator.d.ts.map +1 -0
  34. package/dist/cli/components/ModeIndicator.js +52 -0
  35. package/dist/cli/components/ModeIndicator.js.map +1 -0
  36. package/dist/cli/components/PlanApproval.d.ts +36 -0
  37. package/dist/cli/components/PlanApproval.d.ts.map +1 -0
  38. package/dist/cli/components/PlanApproval.js +154 -0
  39. package/dist/cli/components/PlanApproval.js.map +1 -0
  40. package/dist/cli/components/QuestionPrompt.d.ts +23 -0
  41. package/dist/cli/components/QuestionPrompt.d.ts.map +1 -0
  42. package/dist/cli/components/QuestionPrompt.js +231 -0
  43. package/dist/cli/components/QuestionPrompt.js.map +1 -0
  44. package/dist/cli/components/index.d.ts +1 -0
  45. package/dist/cli/components/index.d.ts.map +1 -1
  46. package/dist/cli/components/index.js +1 -0
  47. package/dist/cli/components/index.js.map +1 -1
  48. package/dist/cli/components/theme.d.ts +9 -0
  49. package/dist/cli/components/theme.d.ts.map +1 -1
  50. package/dist/cli/components/theme.js +14 -1
  51. package/dist/cli/components/theme.js.map +1 -1
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +2 -0
  55. package/dist/index.js.map +1 -1
  56. package/dist/permissions/types.d.ts.map +1 -1
  57. package/dist/permissions/types.js +2 -0
  58. package/dist/permissions/types.js.map +1 -1
  59. package/dist/planning/index.d.ts +13 -0
  60. package/dist/planning/index.d.ts.map +1 -0
  61. package/dist/planning/index.js +15 -0
  62. package/dist/planning/index.js.map +1 -0
  63. package/dist/planning/plan-file.d.ts +59 -0
  64. package/dist/planning/plan-file.d.ts.map +1 -0
  65. package/dist/planning/plan-file.js +278 -0
  66. package/dist/planning/plan-file.js.map +1 -0
  67. package/dist/planning/state.d.ts +127 -0
  68. package/dist/planning/state.d.ts.map +1 -0
  69. package/dist/planning/state.js +261 -0
  70. package/dist/planning/state.js.map +1 -0
  71. package/dist/planning/tools/enter-plan-mode.d.ts +25 -0
  72. package/dist/planning/tools/enter-plan-mode.d.ts.map +1 -0
  73. package/dist/planning/tools/enter-plan-mode.js +98 -0
  74. package/dist/planning/tools/enter-plan-mode.js.map +1 -0
  75. package/dist/planning/tools/exit-plan-mode.d.ts +24 -0
  76. package/dist/planning/tools/exit-plan-mode.d.ts.map +1 -0
  77. package/dist/planning/tools/exit-plan-mode.js +149 -0
  78. package/dist/planning/tools/exit-plan-mode.js.map +1 -0
  79. package/dist/planning/types.d.ts +100 -0
  80. package/dist/planning/types.d.ts.map +1 -0
  81. package/dist/planning/types.js +28 -0
  82. package/dist/planning/types.js.map +1 -0
  83. package/dist/pricing/calculator.d.ts +21 -0
  84. package/dist/pricing/calculator.d.ts.map +1 -0
  85. package/dist/pricing/calculator.js +59 -0
  86. package/dist/pricing/calculator.js.map +1 -0
  87. package/dist/pricing/index.d.ts +7 -0
  88. package/dist/pricing/index.d.ts.map +1 -0
  89. package/dist/pricing/index.js +7 -0
  90. package/dist/pricing/index.js.map +1 -0
  91. package/dist/pricing/models.d.ts +20 -0
  92. package/dist/pricing/models.d.ts.map +1 -0
  93. package/dist/pricing/models.js +322 -0
  94. package/dist/pricing/models.js.map +1 -0
  95. package/dist/pricing/types.d.ts +30 -0
  96. package/dist/pricing/types.d.ts.map +1 -0
  97. package/dist/pricing/types.js +5 -0
  98. package/dist/pricing/types.js.map +1 -0
  99. package/dist/providers/anthropic.d.ts.map +1 -1
  100. package/dist/providers/anthropic.js +17 -10
  101. package/dist/providers/anthropic.js.map +1 -1
  102. package/dist/providers/gemini.d.ts.map +1 -1
  103. package/dist/providers/gemini.js +21 -14
  104. package/dist/providers/gemini.js.map +1 -1
  105. package/dist/providers/openai.d.ts.map +1 -1
  106. package/dist/providers/openai.js +12 -8
  107. package/dist/providers/openai.js.map +1 -1
  108. package/dist/providers/types.d.ts +2 -0
  109. package/dist/providers/types.d.ts.map +1 -1
  110. package/dist/providers/vertex-ai.d.ts.map +1 -1
  111. package/dist/providers/vertex-ai.js +17 -10
  112. package/dist/providers/vertex-ai.js.map +1 -1
  113. package/dist/session/manager.d.ts +4 -0
  114. package/dist/session/manager.d.ts.map +1 -1
  115. package/dist/session/manager.js +8 -0
  116. package/dist/session/manager.js.map +1 -1
  117. package/dist/tools/builtin/ask-user.d.ts +64 -0
  118. package/dist/tools/builtin/ask-user.d.ts.map +1 -0
  119. package/dist/tools/builtin/ask-user.js +148 -0
  120. package/dist/tools/builtin/ask-user.js.map +1 -0
  121. package/dist/tools/index.d.ts +19 -1
  122. package/dist/tools/index.d.ts.map +1 -1
  123. package/dist/tools/index.js +11 -0
  124. package/dist/tools/index.js.map +1 -1
  125. package/dist/tools/registry.d.ts +13 -0
  126. package/dist/tools/registry.d.ts.map +1 -1
  127. package/dist/tools/registry.js +79 -2
  128. package/dist/tools/registry.js.map +1 -1
  129. package/dist/tools/types.d.ts +17 -0
  130. package/dist/tools/types.d.ts.map +1 -1
  131. package/dist/tools/types.js.map +1 -1
  132. package/docs/cost-tracking-comparison.md +904 -0
  133. package/docs/operating-modes.md +96 -0
  134. package/docs/proposals/0012-ask-user-question.md +66 -1
  135. package/docs/proposals/0025-cost-tracking.md +60 -2
  136. package/docs/proposals/README.md +2 -2
  137. package/examples/test-ask-user.ts +167 -0
  138. package/examples/test-checkpointing.ts +121 -0
  139. package/examples/test-cost-tracking.ts +77 -0
  140. package/examples/test-interrupt-cleanup.ts +94 -0
  141. package/package.json +1 -1
  142. package/src/agent/agent.ts +130 -4
  143. package/src/agent/index.ts +1 -0
  144. package/src/agent/types.ts +19 -1
  145. package/src/checkpointing/checkpoint-manager.ts +327 -0
  146. package/src/checkpointing/index.ts +45 -0
  147. package/src/checkpointing/types.ts +104 -0
  148. package/src/cli/components/App.tsx +259 -8
  149. package/src/cli/components/CommandSuggestions.tsx +5 -0
  150. package/src/cli/components/Messages.tsx +66 -4
  151. package/src/cli/components/ModeIndicator.tsx +174 -0
  152. package/src/cli/components/PlanApproval.tsx +327 -0
  153. package/src/cli/components/QuestionPrompt.tsx +462 -0
  154. package/src/cli/components/index.ts +1 -0
  155. package/src/cli/components/theme.ts +14 -1
  156. package/src/index.ts +15 -0
  157. package/src/permissions/types.ts +2 -0
  158. package/src/planning/index.ts +53 -0
  159. package/src/planning/plan-file.ts +326 -0
  160. package/src/planning/state.ts +305 -0
  161. package/src/planning/tools/enter-plan-mode.ts +111 -0
  162. package/src/planning/tools/exit-plan-mode.ts +170 -0
  163. package/src/planning/types.ts +150 -0
  164. package/src/pricing/calculator.ts +71 -0
  165. package/src/pricing/index.ts +7 -0
  166. package/src/pricing/models.ts +334 -0
  167. package/src/pricing/types.ts +32 -0
  168. package/src/prompts/system/base.txt +42 -0
  169. package/src/prompts/tools/ask-user.txt +110 -0
  170. package/src/providers/anthropic.ts +21 -10
  171. package/src/providers/gemini.ts +25 -14
  172. package/src/providers/openai.ts +17 -8
  173. package/src/providers/types.ts +3 -0
  174. package/src/providers/vertex-ai.ts +21 -10
  175. package/src/session/manager.ts +9 -0
  176. package/src/tools/builtin/ask-user.ts +185 -0
  177. package/src/tools/index.ts +23 -0
  178. package/src/tools/registry.ts +95 -2
  179. package/src/tools/types.ts +18 -0
  180. package/.gencode/settings.local.json +0 -7
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Mode Indicator Component - Shows current mode (NORMAL/PLAN/ACCEPT)
3
+ *
4
+ * Design:
5
+ * ╭────────────────────────────────────╮
6
+ * │ ◉ NORMAL ○ PLAN ○ ACCEPT │
7
+ * ╰────────────────────────────────────╯
8
+ *
9
+ * Or with Shift+Tab toggle hint
10
+ */
11
+ import type { ModeType } from '../../planning/types.js';
12
+ interface ModeIndicatorProps {
13
+ /** Current mode */
14
+ mode: ModeType;
15
+ /** Show toggle hint */
16
+ showHint?: boolean;
17
+ /** Compact mode (inline) */
18
+ compact?: boolean;
19
+ }
20
+ /**
21
+ * Mode Indicator - Shows NORMAL/PLAN/ACCEPT mode toggle
22
+ */
23
+ export declare function ModeIndicator({ mode, showHint, compact }: ModeIndicatorProps): import("react/jsx-runtime").JSX.Element | null;
24
+ interface ModeBadgeProps {
25
+ mode: ModeType;
26
+ }
27
+ /**
28
+ * Mode Badge - Compact badge for header display
29
+ */
30
+ export declare function ModeBadge({ mode }: ModeBadgeProps): import("react/jsx-runtime").JSX.Element;
31
+ interface PlanStatusBarProps {
32
+ /** Current planning phase */
33
+ phase: string;
34
+ /** Plan file path */
35
+ planFilePath?: string;
36
+ }
37
+ /**
38
+ * Plan Status Bar - Shows plan mode status
39
+ */
40
+ export declare function PlanStatusBar({ phase, planFilePath }: PlanStatusBarProps): import("react/jsx-runtime").JSX.Element;
41
+ export {};
42
+ //# sourceMappingURL=ModeIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModeIndicator.d.ts","sourceRoot":"","sources":["../../../src/cli/components/ModeIndicator.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAMxD,UAAU,kBAAkB;IAC1B,mBAAmB;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAMD;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,QAAgB,EAAE,OAAe,EAAE,EAAE,kBAAkB,kDA6D5F;AAMD,UAAU,cAAc;IACtB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,cAAc,2CASjD;AAMD,UAAU,kBAAkB;IAC1B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,kBAAkB,2CAuCxE"}
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Mode Indicator Component - Shows current mode (NORMAL/PLAN/ACCEPT)
4
+ *
5
+ * Design:
6
+ * ╭────────────────────────────────────╮
7
+ * │ ◉ NORMAL ○ PLAN ○ ACCEPT │
8
+ * ╰────────────────────────────────────╯
9
+ *
10
+ * Or with Shift+Tab toggle hint
11
+ */
12
+ import { Box, Text } from 'ink';
13
+ import { colors, icons } from './theme.js';
14
+ // ============================================================================
15
+ // Mode Indicator Component
16
+ // ============================================================================
17
+ /**
18
+ * Mode Indicator - Shows NORMAL/PLAN/ACCEPT mode toggle
19
+ */
20
+ export function ModeIndicator({ mode, showHint = false, compact = false }) {
21
+ const isNormal = mode === 'normal';
22
+ const isPlan = mode === 'plan';
23
+ const isAccept = mode === 'accept';
24
+ if (compact) {
25
+ // Compact inline indicator
26
+ const modeLabel = isPlan ? 'PLAN' : isAccept ? 'ACCEPT' : '';
27
+ const modeColor = isPlan ? colors.warning : isAccept ? colors.success : colors.textMuted;
28
+ if (!modeLabel)
29
+ return null;
30
+ return (_jsxs(Box, { children: [_jsx(Text, { color: modeColor, children: isPlan ? icons.modePlan : icons.modeAccept }), _jsxs(Text, { color: modeColor, children: [" ", modeLabel] })] }));
31
+ }
32
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { borderStyle: "round", borderColor: isPlan ? colors.warning : isAccept ? colors.success : colors.textMuted, paddingX: 1, children: [_jsx(Text, { color: isNormal ? colors.primary : colors.textMuted, children: isNormal ? icons.radio : icons.radioEmpty }), _jsxs(Text, { color: isNormal ? colors.text : colors.textMuted, bold: isNormal, children: [' ', "NORMAL"] }), _jsx(Text, { color: colors.textMuted, children: " " }), _jsx(Text, { color: isPlan ? colors.warning : colors.textMuted, children: isPlan ? icons.radio : icons.radioEmpty }), _jsxs(Text, { color: isPlan ? colors.text : colors.textMuted, bold: isPlan, children: [' ', "PLAN"] }), _jsx(Text, { color: colors.textMuted, children: " " }), _jsx(Text, { color: isAccept ? colors.success : colors.textMuted, children: isAccept ? icons.radio : icons.radioEmpty }), _jsxs(Text, { color: isAccept ? colors.text : colors.textMuted, bold: isAccept, children: [' ', "ACCEPT"] })] }), showHint && (_jsx(Box, { marginTop: 0, children: _jsx(Text, { color: colors.textMuted, dimColor: true, children: " Shift+Tab to cycle modes" }) }))] }));
33
+ }
34
+ /**
35
+ * Mode Badge - Compact badge for header display
36
+ */
37
+ export function ModeBadge({ mode }) {
38
+ const color = mode === 'plan' ? colors.warning : mode === 'accept' ? colors.success : colors.primary;
39
+ const label = mode === 'plan' ? 'PLAN' : mode === 'accept' ? 'ACCEPT' : 'NORMAL';
40
+ return (_jsxs(Text, { color: color, bold: true, children: ["[", label, "]"] }));
41
+ }
42
+ /**
43
+ * Plan Status Bar - Shows plan mode status
44
+ */
45
+ export function PlanStatusBar({ phase, planFilePath }) {
46
+ // Shorten plan file path for display
47
+ const displayPath = planFilePath
48
+ ? planFilePath.replace(process.env.HOME || '', '~').split('/').slice(-2).join('/')
49
+ : '';
50
+ return (_jsxs(Box, { borderStyle: "round", borderColor: colors.warning, paddingX: 1, flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: colors.warning, children: "PLAN MODE" }), _jsx(Text, { color: colors.textMuted, children: " \u2502 " }), _jsx(Text, { color: colors.textSecondary, children: "Phase: " }), _jsx(Text, { color: colors.info, children: phase }), _jsx(Text, { color: colors.textMuted, children: " \u2502 " }), _jsx(Text, { color: colors.textMuted, children: "Shift+Tab to switch" })] }), _jsx(Box, { children: _jsx(Text, { color: colors.textMuted, children: "Allowed: Read, Glob, Grep, WebFetch, WebSearch, TodoWrite" }) }), displayPath && (_jsxs(Box, { children: [_jsx(Text, { color: colors.textMuted, children: "Plan: " }), _jsx(Text, { color: colors.primary, children: displayPath })] }))] }));
51
+ }
52
+ //# sourceMappingURL=ModeIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModeIndicator.js","sourceRoot":"","sources":["../../../src/cli/components/ModeIndicator.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KA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Aa,EAAC,QAAQ,aAGtB,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,0BAAkB,EAC7C,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,yBAAY,EACzC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,aAAa,wBAAgB,EACjD,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,KAAK,GAAQ,EACxC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,yBAAY,EACzC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,oCAA4B,IACrD,EAGN,KAAC,GAAG,cACF,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,0EAEtB,GACH,EAGL,WAAW,IAAI,CACd,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,uBAAe,EAC5C,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,YAAG,WAAW,GAAQ,IAC7C,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Plan Approval Component - Beautiful plan approval UI
3
+ *
4
+ * Displays the implementation plan and asks for user approval with options:
5
+ * 1. Yes, clear context and auto-accept edits (shift+tab)
6
+ * 2. Yes, auto-accept edits
7
+ * 3. Yes, manually approve edits
8
+ * 4. Type here to tell Claude what to change
9
+ *
10
+ * Based on Claude Code's plan approval UI.
11
+ */
12
+ import type { PlanApprovalOption, AllowedPrompt } from '../../planning/types.js';
13
+ interface PlanApprovalProps {
14
+ /** Plan summary text */
15
+ planSummary: string;
16
+ /** Requested permissions from the plan */
17
+ requestedPermissions: AllowedPrompt[];
18
+ /** Files to be changed */
19
+ filesToChange: Array<{
20
+ path: string;
21
+ action: 'create' | 'modify' | 'delete';
22
+ }>;
23
+ /** Plan file path for display */
24
+ planFilePath: string;
25
+ /** Callback when user makes a decision */
26
+ onDecision: (option: PlanApprovalOption, customInput?: string) => void;
27
+ }
28
+ export declare function PlanApproval({ planSummary, requestedPermissions, filesToChange, planFilePath, onDecision, }: PlanApprovalProps): import("react/jsx-runtime").JSX.Element;
29
+ interface ModeChangeNotificationProps {
30
+ fromMode: 'build' | 'plan';
31
+ toMode: 'build' | 'plan';
32
+ planFilePath?: string;
33
+ }
34
+ export declare function ModeChangeNotification({ fromMode, toMode, planFilePath, }: ModeChangeNotificationProps): import("react/jsx-runtime").JSX.Element;
35
+ export {};
36
+ //# sourceMappingURL=PlanApproval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlanApproval.d.ts","sourceRoot":"","sources":["../../../src/cli/components/PlanApproval.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAMjF,UAAU,iBAAiB;IACzB,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,oBAAoB,EAAE,aAAa,EAAE,CAAC;IACtC,0BAA0B;IAC1B,aAAa,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;KAAE,CAAC,CAAC;IAC/E,iCAAiC;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,UAAU,EAAE,CAAC,MAAM,EAAE,kBAAkB,EAAE,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACxE;AA2GD,wBAAgB,YAAY,CAAC,EAC3B,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,UAAU,GACX,EAAE,iBAAiB,2CAgInB;AAMD,UAAU,2BAA2B;IACnC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,MAAM,EACN,YAAY,GACb,EAAE,2BAA2B,2CAqC7B"}
@@ -0,0 +1,154 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Plan Approval Component - Beautiful plan approval UI
4
+ *
5
+ * Displays the implementation plan and asks for user approval with options:
6
+ * 1. Yes, clear context and auto-accept edits (shift+tab)
7
+ * 2. Yes, auto-accept edits
8
+ * 3. Yes, manually approve edits
9
+ * 4. Type here to tell Claude what to change
10
+ *
11
+ * Based on Claude Code's plan approval UI.
12
+ */
13
+ import { useState } from 'react';
14
+ import { Box, Text, useInput } from 'ink';
15
+ import { colors, icons } from './theme.js';
16
+ // ============================================================================
17
+ // Constants
18
+ // ============================================================================
19
+ const APPROVAL_OPTIONS = [
20
+ {
21
+ label: 'Yes, clear context and auto-accept edits',
22
+ shortcut: 'shift+tab',
23
+ option: 'approve_clear',
24
+ description: 'Fresh start with automatic approval',
25
+ },
26
+ {
27
+ label: 'Yes, auto-accept edits',
28
+ shortcut: '1',
29
+ option: 'approve',
30
+ description: 'Continue with automatic approval',
31
+ },
32
+ {
33
+ label: 'Yes, manually approve edits',
34
+ shortcut: '2',
35
+ option: 'approve_manual',
36
+ description: 'Review each change before applying',
37
+ },
38
+ {
39
+ label: 'Type here to tell Claude what to change',
40
+ shortcut: '3',
41
+ option: 'modify',
42
+ description: 'Go back to modify the plan',
43
+ },
44
+ ];
45
+ // ============================================================================
46
+ // Helper Components
47
+ // ============================================================================
48
+ function FileChangesList({ files, }) {
49
+ if (files.length === 0)
50
+ return null;
51
+ const getIcon = (action) => {
52
+ switch (action) {
53
+ case 'create':
54
+ return { icon: '+', color: colors.success };
55
+ case 'modify':
56
+ return { icon: '~', color: colors.warning };
57
+ case 'delete':
58
+ return { icon: '-', color: colors.error };
59
+ default:
60
+ return { icon: '?', color: colors.textMuted };
61
+ }
62
+ };
63
+ return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { color: colors.textSecondary, children: "Files to change:" }), files.slice(0, 8).map((file, i) => {
64
+ const { icon, color } = getIcon(file.action);
65
+ return (_jsxs(Text, { children: [_jsxs(Text, { color: color, children: [" ", icon, " "] }), _jsx(Text, { children: file.path }), _jsxs(Text, { color: colors.textMuted, children: [" (", file.action, ")"] })] }, i));
66
+ }), files.length > 8 && (_jsxs(Text, { color: colors.textMuted, children: [" ... and ", files.length - 8, " more files"] }))] }));
67
+ }
68
+ function PermissionsList({ permissions }) {
69
+ if (permissions.length === 0)
70
+ return null;
71
+ return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { color: colors.textSecondary, children: "Requested permissions:" }), permissions.map((perm, i) => (_jsxs(Text, { children: [_jsx(Text, { color: colors.textMuted, children: " - " }), _jsx(Text, { color: colors.tool, children: perm.tool }), _jsx(Text, { color: colors.textMuted, children: "(prompt: " }), _jsx(Text, { children: perm.prompt }), _jsx(Text, { color: colors.textMuted, children: ")" })] }, i)))] }));
72
+ }
73
+ // ============================================================================
74
+ // Plan Approval Component
75
+ // ============================================================================
76
+ export function PlanApproval({ planSummary, requestedPermissions, filesToChange, planFilePath, onDecision, }) {
77
+ const [selectedIndex, setSelectedIndex] = useState(0);
78
+ const [isTyping, setIsTyping] = useState(false);
79
+ const [customInput, setCustomInput] = useState('');
80
+ // Handle keyboard input
81
+ useInput((inputChar, key) => {
82
+ if (isTyping) {
83
+ // Handle typing mode
84
+ if (key.escape) {
85
+ setIsTyping(false);
86
+ setCustomInput('');
87
+ }
88
+ else if (key.return && customInput.trim()) {
89
+ onDecision('modify', customInput.trim());
90
+ }
91
+ else if (key.backspace || key.delete) {
92
+ setCustomInput((prev) => prev.slice(0, -1));
93
+ }
94
+ else if (inputChar && !key.ctrl && !key.meta) {
95
+ setCustomInput((prev) => prev + inputChar);
96
+ }
97
+ return;
98
+ }
99
+ // Arrow navigation
100
+ if (key.upArrow) {
101
+ setSelectedIndex((i) => Math.max(0, i - 1));
102
+ }
103
+ else if (key.downArrow) {
104
+ setSelectedIndex((i) => Math.min(APPROVAL_OPTIONS.length - 1, i + 1));
105
+ }
106
+ // Enter to select current option
107
+ if (key.return) {
108
+ const selected = APPROVAL_OPTIONS[selectedIndex];
109
+ if (selected.option === 'modify') {
110
+ setIsTyping(true);
111
+ }
112
+ else {
113
+ onDecision(selected.option);
114
+ }
115
+ }
116
+ // Escape to cancel
117
+ if (key.escape) {
118
+ onDecision('cancel');
119
+ }
120
+ // Shift+Tab for approve_clear
121
+ if (key.shift && key.tab) {
122
+ onDecision('approve_clear');
123
+ }
124
+ // Number shortcuts
125
+ if (inputChar === '1') {
126
+ onDecision('approve');
127
+ }
128
+ else if (inputChar === '2') {
129
+ onDecision('approve_manual');
130
+ }
131
+ else if (inputChar === '3') {
132
+ setSelectedIndex(3);
133
+ setIsTyping(true);
134
+ }
135
+ });
136
+ // Shorten plan file path
137
+ const displayPath = planFilePath
138
+ .replace(process.env.HOME || '', '~')
139
+ .split('/')
140
+ .slice(-3)
141
+ .join('/');
142
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: colors.warning, paddingX: 1, paddingY: 0, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: colors.warning, bold: true, children: "Implementation Plan" }) }), _jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: colors.text, children: planSummary }) }), _jsx(FileChangesList, { files: filesToChange }), _jsx(PermissionsList, { permissions: requestedPermissions }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { bold: true, children: "Would you like to proceed?" }) }), _jsx(Box, { flexDirection: "column", marginTop: 0, marginLeft: 1, children: APPROVAL_OPTIONS.map((opt, index) => {
143
+ const isSelected = index === selectedIndex;
144
+ return (_jsxs(Box, { children: [_jsx(Text, { color: isSelected ? colors.primary : colors.textMuted, children: isSelected ? icons.radio : icons.radioEmpty }), _jsxs(Text, { color: colors.textMuted, children: [" ", String(index + 1), ". "] }), _jsx(Text, { color: isSelected ? colors.text : colors.textSecondary, children: opt.label }), opt.shortcut !== String(index + 1) && (_jsxs(Text, { color: colors.textMuted, children: [" (", opt.shortcut, ")"] }))] }, opt.option));
145
+ }) }), isTyping && (_jsxs(Box, { marginTop: 1, marginLeft: 1, children: [_jsxs(Text, { color: colors.primary, children: [icons.prompt, " "] }), _jsx(Text, { children: customInput }), _jsx(Text, { color: colors.primary, children: icons.cursor })] })), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: colors.textMuted, children: ["ctrl-g to edit in VS Code \u00B7 ", displayPath] }) })] }));
146
+ }
147
+ export function ModeChangeNotification({ fromMode, toMode, planFilePath, }) {
148
+ const isPlanMode = toMode === 'plan';
149
+ const displayPath = planFilePath
150
+ ? planFilePath.replace(process.env.HOME || '', '~').split('/').slice(-2).join('/')
151
+ : '';
152
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: isPlanMode ? colors.warning : colors.success, paddingX: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { color: colors.textMuted, children: [icons.radioEmpty, " ", fromMode.toUpperCase()] }), _jsxs(Text, { color: colors.textMuted, children: [" ", icons.arrow, " "] }), _jsxs(Text, { color: isPlanMode ? colors.warning : colors.success, bold: true, children: [icons.radio, " ", toMode.toUpperCase()] })] }), _jsx(Box, { children: isPlanMode ? (_jsx(Text, { color: colors.warning, children: "Switched to PLAN mode" })) : (_jsx(Text, { color: colors.success, children: "Switched to BUILD mode" })) }), isPlanMode && displayPath && (_jsxs(Box, { children: [_jsx(Text, { color: colors.textMuted, children: "Plan file: " }), _jsx(Text, { color: colors.primary, children: displayPath })] }))] }));
153
+ }
154
+ //# sourceMappingURL=PlanApproval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlanApproval.js","sourceRoot":"","sources":["../../../src/cli/components/PlanApproval.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,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,CAAC,OAAO,sCAA8B,CAC1D,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,uCAA+B,CAC3D,GACG,EAEL,UAAU,IAAI,WAAW,IAAI,CAC5B,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,4BAAoB,EACjD,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,YAAG,WAAW,GAAQ,IAC7C,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * QuestionPrompt Component - Claude Code style structured questioning UI
3
+ *
4
+ * Matches Claude Code's AskUserQuestion UI pattern:
5
+ * - Progress bar with step indicators (← □ Step1 □ Step2 ✓ Submit →)
6
+ * - Numbered options with cursor indicator
7
+ * - Description on separate line
8
+ * - Keyboard hints at bottom
9
+ */
10
+ import type { Question, QuestionAnswer } from '../../tools/types.js';
11
+ interface QuestionPromptProps {
12
+ questions: Question[];
13
+ onComplete: (answers: QuestionAnswer[]) => void;
14
+ onCancel?: () => void;
15
+ }
16
+ export declare function QuestionPrompt({ questions, onComplete, onCancel }: QuestionPromptProps): import("react/jsx-runtime").JSX.Element;
17
+ interface AnswerDisplayProps {
18
+ answers: QuestionAnswer[];
19
+ compact?: boolean;
20
+ }
21
+ export declare function AnswerDisplay({ answers, compact }: AnswerDisplayProps): import("react/jsx-runtime").JSX.Element;
22
+ export {};
23
+ //# sourceMappingURL=QuestionPrompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionPrompt.d.ts","sourceRoot":"","sources":["../../../src/cli/components/QuestionPrompt.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAMrE,UAAU,mBAAmB;IAC3B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,UAAU,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAiED,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,mBAAmB,2CAuVtF;AAMD,UAAU,kBAAkB;IAC1B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,OAAc,EAAE,EAAE,kBAAkB,2CAmB5E"}
@@ -0,0 +1,231 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * QuestionPrompt Component - Claude Code style structured questioning UI
4
+ *
5
+ * Matches Claude Code's AskUserQuestion UI pattern:
6
+ * - Progress bar with step indicators (← □ Step1 □ Step2 ✓ Submit →)
7
+ * - Numbered options with cursor indicator
8
+ * - Description on separate line
9
+ * - Keyboard hints at bottom
10
+ */
11
+ import { useState, useCallback } from 'react';
12
+ import { Box, Text, useInput } from 'ink';
13
+ import { colors } from './theme.js';
14
+ function ProgressBar({ questions, currentIndex, answers, showSubmit = true }) {
15
+ const isReviewMode = currentIndex >= questions.length;
16
+ return (_jsxs(Box, { children: [_jsx(Text, { color: colors.textMuted, children: "\u2190 " }), questions.map((q, idx) => {
17
+ const isCompleted = idx < answers.length;
18
+ const isCurrent = idx === currentIndex;
19
+ const checkmark = isCompleted ? '☒' : '☐';
20
+ return (_jsxs(Box, { children: [isCurrent ? (_jsx(Text, { backgroundColor: "#6366F1", color: "#FFFFFF", bold: true, children: ` □ ${q.header} ` })) : (_jsxs(Text, { color: isCompleted ? colors.textSecondary : colors.textMuted, children: [checkmark, " ", q.header] })), _jsx(Text, { color: colors.textMuted, children: " " })] }, idx));
21
+ }), showSubmit && (_jsx(_Fragment, { children: isReviewMode ? (_jsx(Text, { backgroundColor: "#22C55E", color: "#FFFFFF", bold: true, children: ` ✓ Submit ` })) : (_jsx(Text, { color: colors.textMuted, children: "\u2713 Submit" })) })), _jsx(Text, { color: colors.textMuted, children: " \u2192" })] }));
22
+ }
23
+ // ============================================================================
24
+ // QuestionPrompt Component
25
+ // ============================================================================
26
+ export function QuestionPrompt({ questions, onComplete, onCancel }) {
27
+ const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0);
28
+ const [answers, setAnswers] = useState([]);
29
+ const [selectedOptions, setSelectedOptions] = useState(new Set());
30
+ const [optionIndex, setOptionIndex] = useState(0);
31
+ const [showOtherInput, setShowOtherInput] = useState(false);
32
+ const [otherInput, setOtherInput] = useState('');
33
+ const [isReviewMode, setIsReviewMode] = useState(false);
34
+ const [reviewOptionIndex, setReviewOptionIndex] = useState(0);
35
+ const currentQuestion = questions[currentQuestionIndex];
36
+ const showProgressBar = questions.length > 1;
37
+ // Add "Type something." option to the list
38
+ const optionsWithOther = currentQuestion
39
+ ? [
40
+ ...currentQuestion.options,
41
+ { label: 'Type something.', description: '', isOther: true },
42
+ ]
43
+ : [];
44
+ // Toggle option selection (for multi-select)
45
+ const toggleOption = useCallback(() => {
46
+ const option = optionsWithOther[optionIndex];
47
+ setSelectedOptions((prev) => {
48
+ const next = new Set(prev);
49
+ if (next.has(option.label)) {
50
+ next.delete(option.label);
51
+ }
52
+ else {
53
+ next.add(option.label);
54
+ }
55
+ return next;
56
+ });
57
+ }, [optionIndex, optionsWithOther]);
58
+ // Finish current question and move to next or review
59
+ const finishQuestion = useCallback((selected, customInput) => {
60
+ const answer = {
61
+ question: currentQuestion.question,
62
+ header: currentQuestion.header,
63
+ selectedOptions: selected.filter((s) => s !== 'Type something.'),
64
+ customInput,
65
+ };
66
+ const newAnswers = [...answers, answer];
67
+ if (currentQuestionIndex < questions.length - 1) {
68
+ // Move to next question
69
+ setAnswers(newAnswers);
70
+ setCurrentQuestionIndex((i) => i + 1);
71
+ setSelectedOptions(new Set());
72
+ setOptionIndex(0);
73
+ setShowOtherInput(false);
74
+ setOtherInput('');
75
+ }
76
+ else {
77
+ // All questions answered, go to review mode (for multi-question)
78
+ setAnswers(newAnswers);
79
+ if (questions.length > 1) {
80
+ setIsReviewMode(true);
81
+ setReviewOptionIndex(0);
82
+ }
83
+ else {
84
+ // Single question, complete immediately
85
+ onComplete(newAnswers);
86
+ }
87
+ }
88
+ }, [currentQuestion, currentQuestionIndex, questions.length, answers, onComplete]);
89
+ // Handle selection (Enter key)
90
+ const handleSelect = useCallback(() => {
91
+ const option = optionsWithOther[optionIndex];
92
+ if (currentQuestion.multiSelect) {
93
+ if (selectedOptions.size === 0) {
94
+ toggleOption();
95
+ return;
96
+ }
97
+ if (selectedOptions.has('Type something.')) {
98
+ setShowOtherInput(true);
99
+ }
100
+ else {
101
+ finishQuestion([...selectedOptions]);
102
+ }
103
+ }
104
+ else {
105
+ if (option.isOther) {
106
+ setShowOtherInput(true);
107
+ }
108
+ else {
109
+ finishQuestion([option.label]);
110
+ }
111
+ }
112
+ }, [
113
+ optionIndex,
114
+ optionsWithOther,
115
+ currentQuestion?.multiSelect,
116
+ selectedOptions,
117
+ toggleOption,
118
+ finishQuestion,
119
+ ]);
120
+ // Handle keyboard input
121
+ useInput((input, key) => {
122
+ // Review mode navigation
123
+ if (isReviewMode) {
124
+ if (key.upArrow) {
125
+ setReviewOptionIndex((i) => Math.max(0, i - 1));
126
+ }
127
+ else if (key.downArrow) {
128
+ setReviewOptionIndex((i) => Math.min(1, i + 1));
129
+ }
130
+ else if (key.return) {
131
+ if (reviewOptionIndex === 0) {
132
+ // Submit
133
+ onComplete(answers);
134
+ }
135
+ else {
136
+ // Cancel
137
+ onCancel?.();
138
+ }
139
+ }
140
+ else if (key.escape) {
141
+ onCancel?.();
142
+ }
143
+ return;
144
+ }
145
+ if (showOtherInput) {
146
+ if (key.return) {
147
+ if (otherInput.trim()) {
148
+ if (currentQuestion.multiSelect) {
149
+ const selected = [...selectedOptions].filter((s) => s !== 'Type something.');
150
+ finishQuestion(selected, otherInput.trim());
151
+ }
152
+ else {
153
+ finishQuestion([], otherInput.trim());
154
+ }
155
+ }
156
+ }
157
+ else if (key.escape) {
158
+ setShowOtherInput(false);
159
+ setOtherInput('');
160
+ }
161
+ else if (key.backspace || key.delete) {
162
+ setOtherInput((prev) => prev.slice(0, -1));
163
+ }
164
+ else if (input && !key.ctrl && !key.meta) {
165
+ setOtherInput((prev) => prev + input);
166
+ }
167
+ return;
168
+ }
169
+ // Navigation
170
+ if (key.upArrow) {
171
+ setOptionIndex((i) => Math.max(0, i - 1));
172
+ }
173
+ else if (key.downArrow) {
174
+ setOptionIndex((i) => Math.min(optionsWithOther.length - 1, i + 1));
175
+ }
176
+ else if (key.tab) {
177
+ // Tab cycles through options
178
+ setOptionIndex((i) => (i + 1) % optionsWithOther.length);
179
+ }
180
+ // Selection
181
+ if (key.return) {
182
+ handleSelect();
183
+ }
184
+ // Toggle (multi-select only)
185
+ if (input === ' ' && currentQuestion.multiSelect) {
186
+ toggleOption();
187
+ }
188
+ // Number shortcuts (1-5)
189
+ const num = parseInt(input, 10);
190
+ if (num >= 1 && num <= optionsWithOther.length) {
191
+ setOptionIndex(num - 1);
192
+ if (!currentQuestion.multiSelect) {
193
+ const option = optionsWithOther[num - 1];
194
+ if (option.isOther) {
195
+ setShowOtherInput(true);
196
+ }
197
+ else {
198
+ finishQuestion([option.label]);
199
+ }
200
+ }
201
+ }
202
+ // Escape to cancel
203
+ if (key.escape && onCancel) {
204
+ onCancel();
205
+ }
206
+ });
207
+ // Review mode UI
208
+ if (isReviewMode) {
209
+ return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [showProgressBar && (_jsx(Box, { marginBottom: 1, children: _jsx(ProgressBar, { questions: questions, currentIndex: questions.length, answers: answers }) })), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, children: "Review your answers" }) }), _jsx(Box, { flexDirection: "column", marginBottom: 1, paddingLeft: 1, children: answers.map((answer, idx) => {
210
+ const selections = answer.customInput
211
+ ? [...answer.selectedOptions, answer.customInput].join(', ')
212
+ : answer.selectedOptions.join(', ');
213
+ return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: colors.textSecondary, children: "\u25CF " }), _jsx(Text, { bold: true, children: answer.question })] }), _jsx(Box, { paddingLeft: 2, children: _jsxs(Text, { color: colors.primary, children: ["\u2192 ", selections] }) })] }, idx));
214
+ }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { children: "Ready to submit your answers?" }) }), _jsxs(Box, { flexDirection: "column", paddingLeft: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: reviewOptionIndex === 0 ? colors.text : colors.textMuted, children: reviewOptionIndex === 0 ? '❯ ' : ' ' }), _jsx(Text, { color: colors.primary, bold: reviewOptionIndex === 0, children: "1. Submit answers" })] }), _jsxs(Box, { children: [_jsx(Text, { color: reviewOptionIndex === 1 ? colors.text : colors.textMuted, children: reviewOptionIndex === 1 ? '❯ ' : ' ' }), _jsx(Text, { bold: reviewOptionIndex === 1, children: "2. Cancel" })] })] }), _jsx(Box, { marginTop: 1, marginBottom: 1, children: _jsx(Text, { color: colors.textMuted, children: '─'.repeat(60) }) }), _jsx(Box, { children: _jsx(Text, { color: colors.textMuted, children: "Enter to select \u00B7 Tab/Arrow keys to navigate \u00B7 Esc to cancel" }) })] }));
215
+ }
216
+ // Normal question mode UI
217
+ return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [showProgressBar && (_jsx(Box, { marginBottom: 1, children: _jsx(ProgressBar, { questions: questions, currentIndex: currentQuestionIndex, answers: answers }) })), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, children: currentQuestion.question }) }), _jsx(Box, { flexDirection: "column", paddingLeft: 1, children: optionsWithOther.map((option, index) => {
218
+ const isSelected = index === optionIndex;
219
+ const isChecked = selectedOptions.has(option.label);
220
+ return (_jsxs(Box, { flexDirection: "column", marginBottom: option.description ? 1 : 0, children: [_jsxs(Box, { children: [_jsx(Text, { color: isSelected ? colors.text : colors.textMuted, children: isSelected ? '❯ ' : ' ' }), _jsxs(Text, { color: colors.textMuted, children: [index + 1, ". "] }), currentQuestion.multiSelect && (_jsx(Text, { color: colors.primary, children: isChecked ? '☒ ' : '☐ ' })), _jsx(Text, { color: colors.primary, bold: true, children: option.label })] }), option.description && (_jsx(Box, { paddingLeft: 4, children: _jsx(Text, { color: colors.textMuted, children: option.description }) }))] }, option.label));
221
+ }) }), showOtherInput && (_jsxs(Box, { marginTop: 1, paddingLeft: 1, children: [_jsx(Text, { color: colors.textMuted, children: "Type your answer: " }), _jsx(Text, { children: otherInput }), _jsx(Text, { color: colors.primary, children: "\u258B" })] })), _jsx(Box, { marginTop: 1, marginBottom: 1, children: _jsx(Text, { color: colors.textMuted, children: '─'.repeat(60) }) }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: colors.textMuted, children: " Chat about this" }) }), _jsx(Box, { children: _jsxs(Text, { color: colors.textMuted, children: ["Enter to select \u00B7 Tab/Arrow keys to navigate", currentQuestion.multiSelect && ' · Space to toggle', onCancel && ' · Esc to cancel'] }) })] }));
222
+ }
223
+ export function AnswerDisplay({ answers, compact = true }) {
224
+ return (_jsx(Box, { flexDirection: "column", children: answers.map((answer, index) => {
225
+ const selections = answer.customInput
226
+ ? [...answer.selectedOptions, answer.customInput].join(', ')
227
+ : answer.selectedOptions.join(', ');
228
+ return (_jsxs(Box, { children: [_jsx(Text, { color: colors.textSecondary, children: "\u25CF " }), _jsx(Text, { children: answer.question }), _jsx(Text, { color: colors.textMuted, children: " \u2192 " }), _jsx(Text, { color: colors.primary, children: selections || '(none)' })] }, index));
229
+ }) }));
230
+ }
231
+ //# sourceMappingURL=QuestionPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionPrompt.js","sourceRoot":"","sources":["../../../src/cli/components/QuestionPrompt.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW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C,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,YAAG,UAAU,IAAI,QAAQ,GAAQ,KAJpD,KAAK,CAKT,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -10,4 +10,5 @@ export { colors, icons } from './theme.js';
10
10
  export { ModelSelector } from './ModelSelector.js';
11
11
  export { CommandSuggestions, COMMANDS, getFilteredCommands } from './CommandSuggestions.js';
12
12
  export { PermissionPrompt, SimpleConfirmPrompt, PermissionRulesDisplay, PermissionAuditDisplay, } from './PermissionPrompt.js';
13
+ export { QuestionPrompt, AnswerDisplay } from './QuestionPrompt.js';
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,SAAS,EACT,cAAc,EACd,aAAa,EACb,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,SAAS,EACT,cAAc,EACd,aAAa,EACb,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
@@ -10,4 +10,5 @@ export { colors, icons } from './theme.js';
10
10
  export { ModelSelector } from './ModelSelector.js';
11
11
  export { CommandSuggestions, COMMANDS, getFilteredCommands } from './CommandSuggestions.js';
12
12
  export { PermissionPrompt, SimpleConfirmPrompt, PermissionRulesDisplay, PermissionAuditDisplay, } from './PermissionPrompt.js';
13
+ export { QuestionPrompt, AnswerDisplay } from './QuestionPrompt.js';
13
14
  //# sourceMappingURL=index.js.map