codeep 1.0.42 → 1.0.44

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/README.md CHANGED
@@ -53,6 +53,13 @@ When started in a project directory, Codeep automatically:
53
53
  - Copy code blocks to clipboard with `/copy [n]`
54
54
  - Code blocks are numbered for easy reference
55
55
 
56
+ ### Clipboard Paste
57
+ - **`/paste` command** - Paste content from clipboard into chat
58
+ - Type `/paste` and press Enter to read clipboard content
59
+ - Shows preview with character/line count before sending
60
+ - Press Enter to send, Escape to cancel
61
+ - Works reliably in all terminals (no Ctrl+V issues)
62
+
56
63
  ### Autonomous Agent Mode
57
64
 
58
65
  Codeep works as a **full AI coding agent** that autonomously:
package/dist/app.js CHANGED
@@ -1329,7 +1329,7 @@ export const App = () => {
1329
1329
  const actionColor = change.action === 'delete' ? 'red' : change.action === 'edit' ? 'yellow' : 'green';
1330
1330
  const actionLabel = change.action === 'delete' ? 'DELETE' : change.action === 'edit' ? 'EDIT' : 'CREATE';
1331
1331
  return (_jsxs(Text, { children: ["\u2022 ", _jsxs(Text, { color: actionColor, children: ["[", actionLabel, "]"] }), " ", change.path, change.action !== 'delete' && change.content.includes('\n') && ` (${change.content.split('\n').length} lines)`] }, i));
1332
- }), _jsx(Text, { children: " " }), _jsxs(Text, { children: ["Apply changes? ", _jsx(Text, { color: "#f02a30", bold: true, children: "[Y/n]" })] }), _jsx(Text, { color: "gray", children: "Press Y to apply, N or Esc to reject" })] })), notification && (_jsx(Box, { justifyContent: "center", children: _jsx(Text, { color: "cyan", children: notification }) })), _jsx(Box, { borderStyle: "single", borderColor: "gray", paddingX: 1, children: _jsx(ChatInput, { onSubmit: handleSubmit, disabled: isLoading || isAgentRunning || pendingFileChanges.length > 0, history: inputHistory, clearTrigger: clearInputTrigger }) }), _jsx(Box, { children: _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Ctrl+L" }), " Clear", _jsx(Text, { color: "#f02a30", children: " Esc" }), " Cancel", _jsx(Text, { color: "#f02a30", children: " /help" }), " Commands"] }) })] }));
1332
+ }), _jsx(Text, { children: " " }), _jsxs(Text, { children: ["Apply changes? ", _jsx(Text, { color: "#f02a30", bold: true, children: "[Y/n]" })] }), _jsx(Text, { color: "gray", children: "Press Y to apply, N or Esc to reject" })] })), notification && (_jsx(Box, { justifyContent: "center", children: _jsx(Text, { color: "cyan", children: notification }) })), _jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "#f02a30", children: '─'.repeat(60) }), _jsx(Box, { paddingX: 1, children: _jsx(ChatInput, { onSubmit: handleSubmit, disabled: isLoading || isAgentRunning || pendingFileChanges.length > 0, history: inputHistory, clearTrigger: clearInputTrigger }) })] }), _jsx(Box, { children: _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Ctrl+L" }), " Clear", _jsx(Text, { color: "#f02a30", children: " Esc" }), " Cancel", _jsx(Text, { color: "#f02a30", children: " /help" }), " Commands"] }) })] }));
1333
1333
  };
1334
1334
  // Model selection component
1335
1335
  const ModelSelect = ({ onClose, notify }) => {
@@ -22,6 +22,7 @@ const COMMANDS = [
22
22
  { cmd: '/commit', desc: 'Generate commit message' },
23
23
  { cmd: '/apply', desc: 'Apply file changes' },
24
24
  { cmd: '/copy', desc: 'Copy code block' },
25
+ { cmd: '/paste', desc: 'Paste from clipboard' },
25
26
  { cmd: '/clear', desc: 'Clear chat' },
26
27
  { cmd: '/login', desc: 'Change API key' },
27
28
  { cmd: '/logout', desc: 'Logout' },
@@ -113,9 +114,23 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
113
114
  return;
114
115
  // Handle Enter - submit
115
116
  if (key.return) {
116
- if (value.trim()) {
117
+ const trimmedValue = value.trim();
118
+ // Handle /paste command - read from clipboard
119
+ if (trimmedValue === '/paste') {
120
+ try {
121
+ const clipboardText = clipboardy.readSync();
122
+ if (clipboardText && clipboardText.trim()) {
123
+ handlePastedText(clipboardText.trim(), true);
124
+ }
125
+ }
126
+ catch {
127
+ // Clipboard read failed
128
+ }
129
+ return;
130
+ }
131
+ if (trimmedValue) {
117
132
  // If we have paste info, submit the full pasted text
118
- const submitValue = pasteInfo ? pasteInfo.fullText : value.trim();
133
+ const submitValue = pasteInfo ? pasteInfo.fullText : trimmedValue;
119
134
  onSubmit(submitValue);
120
135
  setValue('');
121
136
  setCursorPos(0);
@@ -305,5 +320,5 @@ export const ChatInput = ({ onSubmit, disabled, history = [], clearTrigger = 0 }
305
320
  const after = value.slice(cursorPos + 1);
306
321
  return (_jsxs(Text, { children: [before, _jsx(Text, { backgroundColor: "white", color: "black", children: cursor }), after] }));
307
322
  };
308
- return (_jsxs(Box, { flexDirection: "column", children: [suggestions.length > 0 && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [suggestions.slice(0, 8).map((s, i) => (_jsxs(Text, { children: [i === selectedIndex ? _jsx(Text, { color: "#f02a30", children: "\u25B8 " }) : ' ', _jsx(Text, { color: i === selectedIndex ? '#f02a30' : undefined, bold: i === selectedIndex, children: s.cmd }), _jsxs(Text, { color: i === selectedIndex ? undefined : 'gray', children: [" - ", s.desc] })] }, s.cmd))), _jsx(Text, { color: "gray", dimColor: true, children: "\u2191\u2193 navigate \u2022 Tab complete \u2022 Esc cancel" })] })), pasteInfo && (_jsx(Box, { borderStyle: "round", borderColor: "green", paddingX: 1, marginBottom: 1, flexDirection: "column", children: _jsxs(Text, { children: [_jsx(Text, { color: "green", bold: true, children: "\uD83D\uDCCB " }), _jsx(Text, { color: "white", bold: true, children: pasteInfo.chars }), _jsx(Text, { color: "gray", children: " chars" }), pasteInfo.lines > 1 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "gray", children: " \u2022 " }), _jsx(Text, { color: "white", bold: true, children: pasteInfo.lines }), _jsx(Text, { color: "gray", children: " lines" })] })), _jsx(Text, { color: "gray", dimColor: true, children: " (Enter send \u2022 Esc cancel)" })] }) })), _jsxs(Box, { children: [_jsx(Text, { color: "#f02a30", bold: true, children: '> ' }), disabled ? (_jsx(Text, { color: "yellow", children: "Agent working... (Esc to stop)" })) : (renderInput())] })] }));
323
+ return (_jsxs(Box, { flexDirection: "column", children: [suggestions.length > 0 && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [suggestions.slice(0, 8).map((s, i) => (_jsxs(Text, { children: [i === selectedIndex ? _jsx(Text, { color: "#f02a30", children: "\u25B8 " }) : ' ', _jsx(Text, { color: i === selectedIndex ? '#f02a30' : undefined, bold: i === selectedIndex, children: s.cmd }), _jsxs(Text, { color: i === selectedIndex ? undefined : 'gray', children: [" - ", s.desc] })] }, s.cmd))), _jsx(Text, { color: "gray", dimColor: true, children: "\u2191\u2193 navigate \u2022 Tab complete \u2022 Esc cancel" })] })), pasteInfo && (_jsx(Box, { borderStyle: "round", borderColor: "green", paddingX: 1, marginBottom: 1, flexDirection: "column", children: _jsxs(Text, { children: [_jsx(Text, { color: "green", bold: true, children: "\uD83D\uDCCB " }), _jsx(Text, { color: "white", bold: true, children: pasteInfo.chars }), _jsx(Text, { color: "gray", children: " chars" }), pasteInfo.lines > 1 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "gray", children: " \u2022 " }), _jsx(Text, { color: "white", bold: true, children: pasteInfo.lines }), _jsx(Text, { color: "gray", children: " lines" })] })), _jsx(Text, { color: "gray", dimColor: true, children: " (Enter send \u2022 Esc cancel)" })] }) })), _jsxs(Box, { children: [_jsx(Text, { color: "#f02a30", bold: true, children: '> ' }), disabled ? (_jsx(Text, { color: "yellow", children: "Agent working... (Esc to stop)" })) : (renderInput())] }), !disabled && suggestions.length === 0 && !pasteInfo && (_jsx(Box, { marginTop: 0, children: _jsx(Text, { color: "gray", dimColor: true, children: "Ctrl+V paste \u2022 /help commands \u2022 \u2191\u2193 history" }) }))] }));
309
324
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
4
4
  "description": "AI-powered coding assistant built for the terminal. Multiple LLM providers, project-aware context, and a seamless development workflow.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",