@projectservan8n/cnapse 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -114,7 +114,7 @@ var MENU_ITEMS = [
114
114
  { command: "/memory", description: "View/clear learned task patterns", category: "actions" },
115
115
  // Settings
116
116
  { command: "/config", description: "Show/edit configuration", category: "settings" },
117
- { command: "/watch", shortcut: "Ctrl+W", description: "Toggle screen watching", category: "settings" },
117
+ { command: "/watch", shortcut: "Ctrl+E", description: "Toggle screen watching", category: "settings" },
118
118
  { command: "/model", description: "Change AI model", category: "settings" },
119
119
  { command: "/provider", shortcut: "Ctrl+P", description: "Change AI provider", category: "settings" }
120
120
  ];
@@ -1912,6 +1912,7 @@ function App() {
1912
1912
  const [overlay, setOverlay] = useState7("none");
1913
1913
  const [screenWatch, setScreenWatch] = useState7(false);
1914
1914
  const [status, setStatus] = useState7("Ready");
1915
+ const [inputValue, setInputValue] = useState7("");
1915
1916
  const chat2 = useChat(screenWatch);
1916
1917
  const vision = useVision();
1917
1918
  const telegram = useTelegram((msg) => {
@@ -1928,11 +1929,11 @@ function App() {
1928
1929
  if (key.ctrl && inputChar === "l") chat2.clearMessages();
1929
1930
  if (key.ctrl && inputChar === "h") setOverlay("help");
1930
1931
  if (key.ctrl && inputChar === "p") setOverlay("provider");
1931
- if (key.ctrl && inputChar === "w") {
1932
+ if (key.ctrl && inputChar === "e") {
1932
1933
  setScreenWatch((prev) => {
1933
1934
  const newState = !prev;
1934
1935
  chat2.addSystemMessage(
1935
- newState ? "\u{1F5A5}\uFE0F Screen watching enabled." : "\u{1F5A5}\uFE0F Screen watching disabled."
1936
+ newState ? "\u{1F5A5}\uFE0F Screen watching enabled (Ctrl+E to toggle)" : "\u{1F5A5}\uFE0F Screen watching disabled."
1936
1937
  );
1937
1938
  return newState;
1938
1939
  });
@@ -2071,6 +2072,7 @@ ${tasks.format(task)}`);
2071
2072
  }, [chat2, tasks]);
2072
2073
  const handleSubmit = useCallback5(async (value) => {
2073
2074
  if (!value.trim()) return;
2075
+ setInputValue("");
2074
2076
  if (value.startsWith("/")) {
2075
2077
  await handleCommand(value);
2076
2078
  } else {
@@ -2127,9 +2129,8 @@ ${tasks.format(task)}`);
2127
2129
  /* @__PURE__ */ jsx7(
2128
2130
  ChatInput,
2129
2131
  {
2130
- value: "",
2131
- onChange: () => {
2132
- },
2132
+ value: inputValue,
2133
+ onChange: setInputValue,
2133
2134
  onSubmit: handleSubmit,
2134
2135
  isProcessing
2135
2136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projectservan8n/cnapse",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "Autonomous PC intelligence - AI assistant for desktop automation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,6 +18,7 @@ export function App() {
18
18
  const [overlay, setOverlay] = useState<OverlayType>('none');
19
19
  const [screenWatch, setScreenWatch] = useState(false);
20
20
  const [status, setStatus] = useState('Ready');
21
+ const [inputValue, setInputValue] = useState('');
21
22
 
22
23
  // Feature hooks
23
24
  const chat = useChat(screenWatch);
@@ -39,11 +40,12 @@ export function App() {
39
40
  if (key.ctrl && inputChar === 'l') chat.clearMessages();
40
41
  if (key.ctrl && inputChar === 'h') setOverlay('help');
41
42
  if (key.ctrl && inputChar === 'p') setOverlay('provider');
42
- if (key.ctrl && inputChar === 'w') {
43
+ // Note: Ctrl+W avoided - conflicts with terminal close
44
+ if (key.ctrl && inputChar === 'e') {
43
45
  setScreenWatch(prev => {
44
46
  const newState = !prev;
45
47
  chat.addSystemMessage(newState
46
- ? '🖥️ Screen watching enabled.'
48
+ ? '🖥️ Screen watching enabled (Ctrl+E to toggle)'
47
49
  : '🖥️ Screen watching disabled.'
48
50
  );
49
51
  return newState;
@@ -203,6 +205,7 @@ export function App() {
203
205
  // Submit handler
204
206
  const handleSubmit = useCallback(async (value: string) => {
205
207
  if (!value.trim()) return;
208
+ setInputValue(''); // Clear input immediately
206
209
 
207
210
  if (value.startsWith('/')) {
208
211
  await handleCommand(value);
@@ -269,8 +272,8 @@ export function App() {
269
272
  )}
270
273
 
271
274
  <ChatInput
272
- value=""
273
- onChange={() => {}}
275
+ value={inputValue}
276
+ onChange={setInputValue}
274
277
  onSubmit={handleSubmit}
275
278
  isProcessing={isProcessing}
276
279
  />
@@ -22,7 +22,7 @@ const MENU_ITEMS: MenuItem[] = [
22
22
 
23
23
  // Settings
24
24
  { command: '/config', description: 'Show/edit configuration', category: 'settings' },
25
- { command: '/watch', shortcut: 'Ctrl+W', description: 'Toggle screen watching', category: 'settings' },
25
+ { command: '/watch', shortcut: 'Ctrl+E', description: 'Toggle screen watching', category: 'settings' },
26
26
  { command: '/model', description: 'Change AI model', category: 'settings' },
27
27
  { command: '/provider', shortcut: 'Ctrl+P', description: 'Change AI provider', category: 'settings' },
28
28
  ];