codeep 1.0.89 → 1.0.91
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/app.js
CHANGED
|
@@ -173,12 +173,18 @@ export const App = () => {
|
|
|
173
173
|
return () => clearTimeout(timer);
|
|
174
174
|
}
|
|
175
175
|
}, [notification, notificationDuration]);
|
|
176
|
-
// Clear input when opening modals
|
|
176
|
+
// Clear input when opening modals and clear terminal when closing
|
|
177
177
|
useEffect(() => {
|
|
178
178
|
if (modalScreen !== null) {
|
|
179
179
|
setClearInputTrigger(prev => prev + 1);
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
else {
|
|
182
|
+
// Modal was just closed - clear any remaining content
|
|
183
|
+
setTimeout(() => {
|
|
184
|
+
stdout?.write('\x1b[2J\x1b[H');
|
|
185
|
+
}, 0);
|
|
186
|
+
}
|
|
187
|
+
}, [modalScreen, stdout]);
|
|
182
188
|
// Handle keyboard shortcuts
|
|
183
189
|
useInput((input, key) => {
|
|
184
190
|
// Ctrl+L to clear chat (F5 doesn't work reliably in all terminals)
|
|
@@ -1410,7 +1416,7 @@ export const App = () => {
|
|
|
1410
1416
|
const actionColor = change.action === 'delete' ? 'red' : change.action === 'edit' ? 'yellow' : 'green';
|
|
1411
1417
|
const actionLabel = change.action === 'delete' ? 'DELETE' : change.action === 'edit' ? 'EDIT' : 'CREATE';
|
|
1412
1418
|
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));
|
|
1413
|
-
}), _jsx(Text, { children: " " }), _jsxs(Text, { children: ["Apply changes? ", _jsx(Text, { color: "#f02a30", bold: true, children: "[Y/n]" })] }), _jsx(Text, { color: "cyan", children: "Press Y to apply, N or Esc to reject" })] })), notification && (_jsx(Box, { justifyContent: "center", children: _jsx(Text, { color: "cyan", children: notification }) })), modalScreen === 'help' && (_jsx(ModalOverlay, { onClose: () => setModalScreen(null), children: _jsx(Help, {}) })), modalScreen === 'status' && (_jsx(ModalOverlay, { onClose: () => setModalScreen(null), children: _jsx(Status, {}) })), modalScreen === 'settings' && (_jsx(ModalOverlay, { onClose: () => setModalScreen(null), children: _jsx(Settings, { onClose: () => setModalScreen(null), notify: notify, hasWriteAccess: hasWriteAccess, hasProjectContext: !!projectContext }) })), _jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "#f02a30", children: '─'.repeat(Math.max(20, stdout?.columns || 80)) }), _jsx(Box, { paddingX: 1, children: _jsx(ChatInput, { onSubmit: handleSubmit, disabled: isLoading || isAgentRunning || pendingFileChanges.length > 0, history: inputHistory, clearTrigger: clearInputTrigger }) }), _jsx(Text, { color: "#f02a30", children: '─'.repeat(Math.max(20, stdout?.columns || 80)) })] }), _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { children: _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", bold: true, children: "Ctrl+V" }), _jsx(Text, { children: " Paste " }), _jsx(Text, { color: "#f02a30", bold: true, children: "Ctrl+L" }), _jsx(Text, { children: " Clear " }), _jsx(Text, { color: "#f02a30", bold: true, children: "Esc" }), _jsx(Text, { children: " Cancel " }), _jsx(Text, { color: "#f02a30", bold: true, children: "\u2191\u2193" }), _jsx(Text, { children: " History " }), _jsx(Text, { color: "#f02a30", bold: true, children: "/help" }), _jsx(Text, { children: " Commands" })] }) }), _jsx(Box, { children: config.get('agentMode') === 'on' ? (hasWriteAccess && projectContext ? (_jsx(Text, { color: "green", children: "Agent: ON \u2713" })) : (_jsx(Text, { color: "yellow", children: "Agent: ON (no permission - use /grant)" }))) : (_jsx(Text, { color: "cyan", children: "Agent: Manual (use /agent)" })) })] })] }, "chat-screen"));
|
|
1419
|
+
}), _jsx(Text, { children: " " }), _jsxs(Text, { children: ["Apply changes? ", _jsx(Text, { color: "#f02a30", bold: true, children: "[Y/n]" })] }), _jsx(Text, { color: "cyan", children: "Press Y to apply, N or Esc to reject" })] })), notification && (_jsx(Box, { justifyContent: "center", children: _jsx(Text, { color: "cyan", children: notification }) })), modalScreen === 'help' && (_jsx(ModalOverlay, { onClose: () => setModalScreen(null), children: _jsx(Help, {}) }, "help-modal")), modalScreen === 'status' && (_jsx(ModalOverlay, { onClose: () => setModalScreen(null), children: _jsx(Status, {}) }, "status-modal")), modalScreen === 'settings' && (_jsx(ModalOverlay, { onClose: () => setModalScreen(null), children: _jsx(Settings, { onClose: () => setModalScreen(null), notify: notify, hasWriteAccess: hasWriteAccess, hasProjectContext: !!projectContext }) }, "settings-modal")), _jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "#f02a30", children: '─'.repeat(Math.max(20, stdout?.columns || 80)) }), _jsx(Box, { paddingX: 1, children: _jsx(ChatInput, { onSubmit: handleSubmit, disabled: isLoading || isAgentRunning || pendingFileChanges.length > 0, history: inputHistory, clearTrigger: clearInputTrigger }) }), _jsx(Text, { color: "#f02a30", children: '─'.repeat(Math.max(20, stdout?.columns || 80)) })] }), _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { children: _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", bold: true, children: "Ctrl+V" }), _jsx(Text, { children: " Paste " }), _jsx(Text, { color: "#f02a30", bold: true, children: "Ctrl+L" }), _jsx(Text, { children: " Clear " }), _jsx(Text, { color: "#f02a30", bold: true, children: "Esc" }), _jsx(Text, { children: " Cancel " }), _jsx(Text, { color: "#f02a30", bold: true, children: "\u2191\u2193" }), _jsx(Text, { children: " History " }), _jsx(Text, { color: "#f02a30", bold: true, children: "/help" }), _jsx(Text, { children: " Commands" })] }) }), _jsx(Box, { children: config.get('agentMode') === 'on' ? (hasWriteAccess && projectContext ? (_jsx(Text, { color: "green", children: "Agent: ON \u2713" })) : (_jsx(Text, { color: "yellow", children: "Agent: ON (no permission - use /grant)" }))) : (_jsx(Text, { color: "cyan", children: "Agent: Manual (use /agent)" })) })] })] }, "chat-screen"));
|
|
1414
1420
|
};
|
|
1415
1421
|
// Model selection component
|
|
1416
1422
|
const ModelSelect = ({ onClose, notify }) => {
|
package/dist/components/Help.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Text, Box } from 'ink';
|
|
3
|
-
export const Help = () => (_jsxs(Box, { flexDirection: "column",
|
|
3
|
+
export const Help = () => (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "#f02a30", bold: true, children: "Commands" }), _jsx(Text, { children: " " }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/help" }), " - Show this help"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/status" }), " - Show current status"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/version" }), " - Show version info"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/update" }), " - Check for updates"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/model" }), " - Switch model"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/protocol" }), " - Switch API protocol"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/provider" }), " - Switch API provider"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/lang" }), " - Set response language"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/settings" }), " - Adjust temp, tokens, timeout, rate limits"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/sessions" }), " - Save/load chat sessions"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/sessions delete" }), " ", '<name>', " - Delete a session"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/rename" }), " ", '<name>', " - Rename current session"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/search" }), " ", '<term>', " - Search through messages (e.g. /search error)"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/export" }), " - Export chat to MD/JSON/TXT format"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/diff" }), " [--staged] - Review git changes with AI"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/commit" }), " - Generate commit message from staged changes"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/apply" }), " - Apply file changes from AI response"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/copy" }), " [n] - Copy code block [n] to clipboard"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/grant" }), " - Grant write permission for agent"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/agent" }), " ", '<task>', " - Start autonomous agent for task"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/agent-dry" }), " ", '<task>', " - Preview agent actions (no changes)"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/agent-stop" }), " - Stop running agent"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/clear" }), " - Clear chat history"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/login" }), " - Login with different key"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/logout" }), " - Logout and clear key"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "/exit" }), " - Quit application"] }), _jsx(Text, { children: " " }), _jsx(Text, { color: "#f02a30", bold: true, children: "Shortcuts" }), _jsx(Text, { children: " " }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "\u2191/\u2193" }), " - Navigate input history or command suggestions"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Tab" }), " - Autocomplete selected command"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Ctrl+L" }), " - Clear chat (same as /clear)"] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Escape" }), " - Cancel request"] }), _jsx(Text, { children: " " }), _jsx(Text, { color: "#f02a30", bold: true, children: "Code Blocks" }), _jsx(Text, { children: " " }), _jsx(Text, { children: "Code blocks are numbered [0], [1], etc." }), _jsxs(Text, { children: ["Use ", _jsx(Text, { color: "#f02a30", children: "/copy" }), " to copy last block, ", _jsx(Text, { color: "#f02a30", children: "/copy 0" }), " for first"] }), _jsx(Text, { children: " " }), _jsx(Text, { color: "#f02a30", bold: true, children: "Project Context" }), _jsx(Text, { children: " " }), _jsx(Text, { children: "When started in a project directory, Codeep can:" }), _jsx(Text, { children: " \u2022 Auto-detect file paths in your messages" }), _jsx(Text, { children: " \u2022 Attach file contents automatically" }), _jsx(Text, { children: " \u2022 Understand your project structure" }), _jsx(Text, { children: " " }), _jsx(Text, { children: "Examples:" }), _jsxs(Text, { children: [" ", _jsx(Text, { children: "\"check src/app.tsx\"" }), " - reads and analyzes file"] }), _jsxs(Text, { children: [" ", _jsx(Text, { children: "\"what does package.json contain\"" }), " - shows file"] }), _jsxs(Text, { children: [" ", _jsx(Text, { children: "\"improve error handling\"" }), " - AI knows project"] }), _jsx(Text, { children: " " }), _jsx(Text, { color: "#f02a30", bold: true, children: "Agent Mode" }), _jsx(Text, { children: " " }), _jsxs(Text, { children: ["Two modes available in ", _jsx(Text, { color: "#f02a30", children: "/settings" }), ":"] }), _jsxs(Text, { children: [" \u2022 ", _jsx(Text, { color: "green", bold: true, children: "ON" }), " - Agent runs automatically on every message"] }), _jsxs(Text, { children: [" \u2022 ", _jsx(Text, { color: "yellow", bold: true, children: "Manual" }), " - Agent runs only with /agent command"] }), _jsx(Text, { children: " " }), _jsx(Text, { children: "Agent capabilities:" }), _jsx(Text, { children: " \u2022 Creates, edits, deletes files automatically" }), _jsx(Text, { children: " \u2022 Runs shell commands (npm, git, etc.)" }), _jsx(Text, { children: " \u2022 Loops until task is complete" }), _jsx(Text, { children: " \u2022 Shows progress and all actions taken" }), _jsx(Text, { children: " " }), _jsx(Text, { children: "Manual mode examples:" }), _jsxs(Text, { children: [" ", _jsx(Text, { color: "#f02a30", children: "/agent" }), " \"add error handling to api.ts\""] }), _jsxs(Text, { children: [" ", _jsx(Text, { color: "#f02a30", children: "/agent" }), " \"run tests and fix failures\""] }), _jsxs(Text, { children: [" ", _jsx(Text, { color: "#f02a30", children: "/agent" }), " \"create a new React component for user profile\""] }), _jsxs(Text, { children: [" ", _jsx(Text, { color: "#f02a30", children: "/agent-dry" }), " \"refactor utils folder\" - preview only"] })] }));
|
|
@@ -194,5 +194,5 @@ export const Settings = ({ onClose, notify, hasWriteAccess = false, hasProjectCo
|
|
|
194
194
|
? '⚠️ Agent needs permission - use /grant to allow folder access'
|
|
195
195
|
: '✓ Agent will run automatically on every message'))
|
|
196
196
|
: 'ℹ️ Manual mode - use /agent <task> to run agent';
|
|
197
|
-
return (_jsxs(Box, { flexDirection: "column",
|
|
197
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "#f02a30", bold: true, children: "Settings" }), _jsx(Text, { children: " " }), SETTINGS.map((setting, i) => (_jsx(Box, { children: _jsxs(Text, { children: [i === selected ? _jsx(Text, { color: "#f02a30", children: "\u25B8 " }) : ' ', _jsxs(Text, { color: i === selected ? '#f02a30' : undefined, children: [setting.label, ":"] }), _jsx(Text, { children: " " }), editing && i === selected ? (_jsx(Text, { color: "cyan", inverse: true, children: editValue || ' ' })) : (_jsx(Text, { color: "green", children: setting.value() })), i === selected && setting.type === 'number' && !editing && (_jsx(Text, { children: " (\u2190/\u2192 adjust, Enter to type)" })), i === selected && setting.type === 'select' && (_jsx(Text, { children: " (\u2190/\u2192 or Enter to toggle)" }))] }) }, setting.key))), _jsx(Text, { children: " " }), _jsx(Text, { color: agentCanRun ? 'green' : (agentMode === 'on' ? 'yellow' : 'gray'), children: agentStatusMessage }), _jsx(Text, { children: " " }), _jsx(Text, { children: "\u2191/\u2193 Navigate | \u2190/\u2192 Adjust | Enter Edit | Esc Close" })] }));
|
|
198
198
|
};
|
|
@@ -9,5 +9,5 @@ export const Status = () => {
|
|
|
9
9
|
const agentMode = config.get('agentMode');
|
|
10
10
|
const provider = getCurrentProvider();
|
|
11
11
|
const models = getModelsForCurrentProvider();
|
|
12
|
-
return (_jsxs(Box, { flexDirection: "column",
|
|
12
|
+
return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: "#f02a30", bold: true, children: "Status" }), _jsx(Text, { children: " " }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Provider:" }), " ", provider.name] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Model:" }), " ", models[model] || model] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Protocol:" }), " ", PROTOCOLS[protocol] || protocol] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Language:" }), " ", LANGUAGES[language] || language] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Plan:" }), " ", plan.toUpperCase()] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "Agent Mode:" }), " ", agentMode === 'on' ? 'ON' : 'Manual'] }), _jsxs(Text, { children: [_jsx(Text, { color: "#f02a30", children: "API Key:" }), " ", getMaskedApiKey()] })] }));
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.91",
|
|
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",
|