thatgfsj-code 0.6.0 → 0.7.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 (147) hide show
  1. package/dist/app/index.d.ts +2 -0
  2. package/dist/app/index.d.ts.map +1 -1
  3. package/dist/app/index.js +10 -5
  4. package/dist/app/index.js.map +1 -1
  5. package/dist/cmd/index.js +1 -1
  6. package/dist/prompts/index.d.ts +2 -0
  7. package/dist/prompts/index.d.ts.map +1 -1
  8. package/dist/prompts/index.js +7 -0
  9. package/dist/prompts/index.js.map +1 -1
  10. package/dist/skills/brainstorming.d.ts +3 -0
  11. package/dist/skills/brainstorming.d.ts.map +1 -0
  12. package/dist/skills/brainstorming.js +42 -0
  13. package/dist/skills/brainstorming.js.map +1 -0
  14. package/dist/skills/code-review.d.ts +3 -0
  15. package/dist/skills/code-review.d.ts.map +1 -0
  16. package/dist/skills/code-review.js +44 -0
  17. package/dist/skills/code-review.js.map +1 -0
  18. package/dist/skills/executing-plans.d.ts +3 -0
  19. package/dist/skills/executing-plans.d.ts.map +1 -0
  20. package/dist/skills/executing-plans.js +26 -0
  21. package/dist/skills/executing-plans.js.map +1 -0
  22. package/dist/skills/frontend-design.d.ts +3 -0
  23. package/dist/skills/frontend-design.d.ts.map +1 -0
  24. package/dist/skills/frontend-design.js +34 -0
  25. package/dist/skills/frontend-design.js.map +1 -0
  26. package/dist/skills/git-workflow.d.ts +3 -0
  27. package/dist/skills/git-workflow.d.ts.map +1 -0
  28. package/dist/skills/git-workflow.js +35 -0
  29. package/dist/skills/git-workflow.js.map +1 -0
  30. package/dist/skills/improve-architecture.d.ts +3 -0
  31. package/dist/skills/improve-architecture.d.ts.map +1 -0
  32. package/dist/skills/improve-architecture.js +37 -0
  33. package/dist/skills/improve-architecture.js.map +1 -0
  34. package/dist/skills/index.d.ts +50 -0
  35. package/dist/skills/index.d.ts.map +1 -0
  36. package/dist/skills/index.js +98 -0
  37. package/dist/skills/index.js.map +1 -0
  38. package/dist/skills/neuroweave.d.ts +3 -0
  39. package/dist/skills/neuroweave.d.ts.map +1 -0
  40. package/dist/skills/neuroweave.js +46 -0
  41. package/dist/skills/neuroweave.js.map +1 -0
  42. package/dist/skills/playwright.d.ts +3 -0
  43. package/dist/skills/playwright.d.ts.map +1 -0
  44. package/dist/skills/playwright.js +71 -0
  45. package/dist/skills/playwright.js.map +1 -0
  46. package/dist/skills/prototype.d.ts +3 -0
  47. package/dist/skills/prototype.d.ts.map +1 -0
  48. package/dist/skills/prototype.js +29 -0
  49. package/dist/skills/prototype.js.map +1 -0
  50. package/dist/skills/subagent.d.ts +3 -0
  51. package/dist/skills/subagent.d.ts.map +1 -0
  52. package/dist/skills/subagent.js +27 -0
  53. package/dist/skills/subagent.js.map +1 -0
  54. package/dist/skills/supabase.d.ts +3 -0
  55. package/dist/skills/supabase.d.ts.map +1 -0
  56. package/dist/skills/supabase.js +43 -0
  57. package/dist/skills/supabase.js.map +1 -0
  58. package/dist/skills/systematic-debugging.d.ts +3 -0
  59. package/dist/skills/systematic-debugging.d.ts.map +1 -0
  60. package/dist/skills/systematic-debugging.js +43 -0
  61. package/dist/skills/systematic-debugging.js.map +1 -0
  62. package/dist/skills/tdd.d.ts +3 -0
  63. package/dist/skills/tdd.d.ts.map +1 -0
  64. package/dist/skills/tdd.js +38 -0
  65. package/dist/skills/tdd.js.map +1 -0
  66. package/dist/skills/triage.d.ts +3 -0
  67. package/dist/skills/triage.d.ts.map +1 -0
  68. package/dist/skills/triage.js +34 -0
  69. package/dist/skills/triage.js.map +1 -0
  70. package/dist/skills/verification.d.ts +3 -0
  71. package/dist/skills/verification.d.ts.map +1 -0
  72. package/dist/skills/verification.js +30 -0
  73. package/dist/skills/verification.js.map +1 -0
  74. package/dist/skills/writing-plans.d.ts +3 -0
  75. package/dist/skills/writing-plans.d.ts.map +1 -0
  76. package/dist/skills/writing-plans.js +41 -0
  77. package/dist/skills/writing-plans.js.map +1 -0
  78. package/dist/tools/index.d.ts +1 -0
  79. package/dist/tools/index.d.ts.map +1 -1
  80. package/dist/tools/index.js +3 -0
  81. package/dist/tools/index.js.map +1 -1
  82. package/dist/tools/nwt.d.ts +70 -0
  83. package/dist/tools/nwt.d.ts.map +1 -0
  84. package/dist/tools/nwt.js +289 -0
  85. package/dist/tools/nwt.js.map +1 -0
  86. package/dist/tui/app.d.ts.map +1 -1
  87. package/dist/tui/app.js +6 -6
  88. package/dist/tui/app.js.map +1 -1
  89. package/dist/tui/components/ChatList.d.ts +4 -5
  90. package/dist/tui/components/ChatList.d.ts.map +1 -1
  91. package/dist/tui/components/ChatList.js +3 -3
  92. package/dist/tui/components/ChatList.js.map +1 -1
  93. package/dist/tui/components/ChatMessage.d.ts +2 -1
  94. package/dist/tui/components/ChatMessage.d.ts.map +1 -1
  95. package/dist/tui/components/ChatMessage.js +7 -7
  96. package/dist/tui/components/ChatMessage.js.map +1 -1
  97. package/dist/tui/components/Header.d.ts.map +1 -1
  98. package/dist/tui/components/Header.js +1 -1
  99. package/dist/tui/components/Header.js.map +1 -1
  100. package/dist/tui/components/StatusBar.d.ts +9 -0
  101. package/dist/tui/components/StatusBar.d.ts.map +1 -0
  102. package/dist/tui/components/StatusBar.js +8 -0
  103. package/dist/tui/components/StatusBar.js.map +1 -0
  104. package/dist/tui/components/Thinking.js +1 -1
  105. package/dist/tui/components/Thinking.js.map +1 -1
  106. package/dist/tui/components/ToolCall.d.ts +2 -1
  107. package/dist/tui/components/ToolCall.d.ts.map +1 -1
  108. package/dist/tui/components/ToolCall.js +29 -24
  109. package/dist/tui/components/ToolCall.js.map +1 -1
  110. package/dist/tui/components/UserInput.d.ts.map +1 -1
  111. package/dist/tui/components/UserInput.js +16 -22
  112. package/dist/tui/components/UserInput.js.map +1 -1
  113. package/dist/tui/hooks/useCommands.d.ts.map +1 -1
  114. package/dist/tui/hooks/useCommands.js +28 -1
  115. package/dist/tui/hooks/useCommands.js.map +1 -1
  116. package/package.json +1 -1
  117. package/src/app/index.ts +12 -6
  118. package/src/cmd/index.tsx +1 -1
  119. package/src/prompts/index.ts +8 -0
  120. package/src/skills/brainstorming.ts +43 -0
  121. package/src/skills/code-review.ts +45 -0
  122. package/src/skills/executing-plans.ts +27 -0
  123. package/src/skills/frontend-design.ts +35 -0
  124. package/src/skills/git-workflow.ts +36 -0
  125. package/src/skills/improve-architecture.ts +38 -0
  126. package/src/skills/index.ts +136 -0
  127. package/src/skills/neuroweave.ts +47 -0
  128. package/src/skills/playwright.ts +72 -0
  129. package/src/skills/prototype.ts +30 -0
  130. package/src/skills/subagent.ts +28 -0
  131. package/src/skills/supabase.ts +44 -0
  132. package/src/skills/systematic-debugging.ts +44 -0
  133. package/src/skills/tdd.ts +39 -0
  134. package/src/skills/triage.ts +35 -0
  135. package/src/skills/verification.ts +31 -0
  136. package/src/skills/writing-plans.ts +42 -0
  137. package/src/tools/index.ts +3 -0
  138. package/src/tools/nwt.ts +362 -0
  139. package/src/tui/app.tsx +9 -8
  140. package/src/tui/components/ChatList.tsx +6 -3
  141. package/src/tui/components/ChatMessage.tsx +15 -12
  142. package/src/tui/components/Header.tsx +13 -7
  143. package/src/tui/components/StatusBar.tsx +30 -0
  144. package/src/tui/components/Thinking.tsx +3 -3
  145. package/src/tui/components/ToolCall.tsx +34 -32
  146. package/src/tui/components/UserInput.tsx +22 -40
  147. package/src/tui/hooks/useCommands.ts +29 -1
@@ -1,5 +1,5 @@
1
1
  /** @jsxImportSource react */
2
- import React, { useState, useCallback } from 'react';
2
+ import React, { useState } from 'react';
3
3
  import { Box, Text, useInput, useApp } from 'ink';
4
4
 
5
5
  interface Props {
@@ -33,28 +33,24 @@ export function UserInput({ onSubmit, disabled }: Props) {
33
33
  return;
34
34
  }
35
35
 
36
- if (key.upArrow) {
37
- if (history.length > 0) {
38
- const newIdx = historyIdx === -1 ? history.length - 1 : Math.max(0, historyIdx - 1);
39
- setHistoryIdx(newIdx);
40
- setValue(history[newIdx]);
41
- setCursorPos(history[newIdx].length);
42
- }
36
+ if (key.upArrow && history.length > 0) {
37
+ const newIdx = historyIdx === -1 ? history.length - 1 : Math.max(0, historyIdx - 1);
38
+ setHistoryIdx(newIdx);
39
+ setValue(history[newIdx]);
40
+ setCursorPos(history[newIdx].length);
43
41
  return;
44
42
  }
45
43
 
46
- if (key.downArrow) {
47
- if (historyIdx >= 0) {
48
- const newIdx = historyIdx + 1;
49
- if (newIdx >= history.length) {
50
- setHistoryIdx(-1);
51
- setValue('');
52
- setCursorPos(0);
53
- } else {
54
- setHistoryIdx(newIdx);
55
- setValue(history[newIdx]);
56
- setCursorPos(history[newIdx].length);
57
- }
44
+ if (key.downArrow && historyIdx >= 0) {
45
+ const newIdx = historyIdx + 1;
46
+ if (newIdx >= history.length) {
47
+ setHistoryIdx(-1);
48
+ setValue('');
49
+ setCursorPos(0);
50
+ } else {
51
+ setHistoryIdx(newIdx);
52
+ setValue(history[newIdx]);
53
+ setCursorPos(history[newIdx].length);
58
54
  }
59
55
  return;
60
56
  }
@@ -67,35 +63,21 @@ export function UserInput({ onSubmit, disabled }: Props) {
67
63
  return;
68
64
  }
69
65
 
70
- if (key.leftArrow) {
71
- setCursorPos(p => Math.max(0, p - 1));
72
- return;
73
- }
74
-
75
- if (key.rightArrow) {
76
- setCursorPos(p => Math.min(value.length, p + 1));
77
- return;
78
- }
79
-
80
- if (key.ctrl && input === 'c') {
81
- exit();
82
- return;
83
- }
66
+ if (key.leftArrow) { setCursorPos(p => Math.max(0, p - 1)); return; }
67
+ if (key.rightArrow) { setCursorPos(p => Math.min(value.length, p + 1)); return; }
68
+ if (key.ctrl && input === 'c') { exit(); return; }
84
69
 
85
- // Regular character input
86
70
  if (input && !key.ctrl && !key.meta) {
87
71
  setValue(v => v.slice(0, cursorPos) + input + v.slice(cursorPos));
88
72
  setCursorPos(p => p + input.length);
89
73
  }
90
74
  });
91
75
 
92
- const prefix = disabled ? ' ' : '❯ ';
93
-
94
76
  return (
95
- <Box>
96
- <Text bold color="cyan">{prefix}</Text>
77
+ <Box paddingY={0}>
78
+ <Text color="#06B6D4" bold>{disabled ? ' ' : '❯ '}</Text>
97
79
  <Text>{value}</Text>
98
- {!disabled && <Text color="cyan">█</Text>}
80
+ {!disabled && <Text color="#06B6D4">█</Text>}
99
81
  </Box>
100
82
  );
101
83
  }
@@ -51,10 +51,38 @@ export function useCommands(app: App) {
51
51
  }
52
52
 
53
53
  case 'clear':
54
- // Handled separately in the App component
55
54
  return { handled: true };
56
55
 
57
56
  default:
57
+ // Handle /skill commands
58
+ if (cmd.startsWith('skill') || cmd.startsWith('/skill')) {
59
+ const parts = input.trim().split(/\s+/);
60
+ const sub = parts[1] || 'list';
61
+
62
+ if (sub === 'list') {
63
+ const all = app.skills.list();
64
+ const lines = all.map(s => {
65
+ const active = app.skills.isActive(s.id) ? '✓' : ' ';
66
+ return ` [${active}] ${s.name.padEnd(28)} ${s.description}`;
67
+ });
68
+ return {
69
+ handled: true,
70
+ output: ['Skills ([✓] = active):', ...lines, '', 'Usage: skill <id> to toggle'].join('\n'),
71
+ };
72
+ }
73
+
74
+ // Toggle skill
75
+ const skillId = sub;
76
+ if (app.skills.isActive(skillId)) {
77
+ app.skills.deactivate(skillId);
78
+ return { handled: true, output: ` Deactivated: ${skillId}` };
79
+ } else if (app.skills.activate(skillId)) {
80
+ return { handled: true, output: ` Activated: ${skillId}` };
81
+ } else {
82
+ return { handled: true, output: ` Unknown skill: ${skillId}` };
83
+ }
84
+ }
85
+
58
86
  return { handled: false };
59
87
  }
60
88
  }, [app]);