codeep 1.0.71 → 1.0.73
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
|
@@ -63,6 +63,7 @@ export const App = () => {
|
|
|
63
63
|
const [hasProjectAccess, setHasProjectAccess] = useState(false);
|
|
64
64
|
const [hasWriteAccess, setHasWriteAccess] = useState(false);
|
|
65
65
|
const [permissionChecked, setPermissionChecked] = useState(false);
|
|
66
|
+
const [isInProject, setIsInProject] = useState(false);
|
|
66
67
|
// Load previous session on startup (after intro)
|
|
67
68
|
const [sessionLoaded, setSessionLoaded] = useState(false);
|
|
68
69
|
// Search state
|
|
@@ -99,6 +100,7 @@ export const App = () => {
|
|
|
99
100
|
useEffect(() => {
|
|
100
101
|
if (!showIntro && !permissionChecked && screen !== 'login') {
|
|
101
102
|
const isProject = isProjectDirectory(projectPath);
|
|
103
|
+
setIsInProject(isProject);
|
|
102
104
|
if (isProject) {
|
|
103
105
|
const hasRead = hasReadPermission(projectPath);
|
|
104
106
|
if (hasRead) {
|
|
@@ -411,14 +413,17 @@ export const App = () => {
|
|
|
411
413
|
}
|
|
412
414
|
// Auto-agent mode: if enabled and we have write access, use agent
|
|
413
415
|
const agentMode = config.get('agentMode');
|
|
414
|
-
logger.debug(`[handleSubmit] agentMode=${agentMode}, hasWriteAccess=${hasWriteAccess}, hasProjectContext=${!!projectContext}`);
|
|
416
|
+
logger.debug(`[handleSubmit] agentMode=${agentMode}, hasWriteAccess=${hasWriteAccess}, hasProjectContext=${!!projectContext}, isInProject=${isInProject}`);
|
|
415
417
|
if (agentMode === 'on') {
|
|
416
|
-
if (!
|
|
418
|
+
if (!isInProject) {
|
|
417
419
|
notify('⚠️ Agent Mode ON: No project detected. Open terminal in a project folder and run codeep there.', 8000);
|
|
418
420
|
}
|
|
419
421
|
else if (!hasWriteAccess) {
|
|
420
422
|
notify('⚠️ Agent Mode ON: Needs write permission. Use /grant to enable.', 8000);
|
|
421
423
|
}
|
|
424
|
+
else if (!projectContext) {
|
|
425
|
+
notify('⚠️ Agent Mode ON: Needs permission. Use /grant to allow project access.', 8000);
|
|
426
|
+
}
|
|
422
427
|
else {
|
|
423
428
|
notify('✓ Using agent mode (change in /settings)');
|
|
424
429
|
startAgent(sanitizedInput, false);
|
|
@@ -1367,7 +1372,7 @@ export const App = () => {
|
|
|
1367
1372
|
}, onCancel: () => setScreen('chat') }));
|
|
1368
1373
|
}
|
|
1369
1374
|
if (screen === 'settings') {
|
|
1370
|
-
return (_jsx(Settings, { onClose: () => setScreen('chat'), notify: notify, hasWriteAccess: hasWriteAccess, hasProjectContext: !!projectContext }));
|
|
1375
|
+
return (_jsx(Settings, { onClose: () => setScreen('chat'), notify: notify, hasWriteAccess: hasWriteAccess, hasProjectContext: !!projectContext, isInProject: isInProject }));
|
|
1371
1376
|
}
|
|
1372
1377
|
if (screen === 'search') {
|
|
1373
1378
|
return (_jsx(Search, { results: searchResults, searchTerm: searchTerm, onClose: () => setScreen('chat'), onSelectMessage: (index) => {
|
|
@@ -1408,7 +1413,7 @@ export const App = () => {
|
|
|
1408
1413
|
const actionColor = change.action === 'delete' ? 'red' : change.action === 'edit' ? 'yellow' : 'green';
|
|
1409
1414
|
const actionLabel = change.action === 'delete' ? 'DELETE' : change.action === 'edit' ? 'EDIT' : 'CREATE';
|
|
1410
1415
|
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));
|
|
1411
|
-
}), _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(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" })) : (_jsxs(Text, { color: "yellow", children: ["Agent: ON (", !
|
|
1416
|
+
}), _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(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" })) : (_jsxs(Text, { color: "yellow", children: ["Agent: ON (", !isInProject ? 'no project - run codeep in project folder' : 'no permission - use /grant', ")"] }))) : (_jsx(Text, { color: "gray", children: "Agent: Manual (use /agent)" })) })] })] }));
|
|
1412
1417
|
};
|
|
1413
1418
|
// Model selection component
|
|
1414
1419
|
const ModelSelect = ({ onClose, notify }) => {
|
|
@@ -97,7 +97,7 @@ const SETTINGS = [
|
|
|
97
97
|
step: 10,
|
|
98
98
|
},
|
|
99
99
|
];
|
|
100
|
-
export const Settings = ({ onClose, notify, hasWriteAccess = false, hasProjectContext = false }) => {
|
|
100
|
+
export const Settings = ({ onClose, notify, hasWriteAccess = false, hasProjectContext = false, isInProject = false }) => {
|
|
101
101
|
const [selected, setSelected] = useState(0);
|
|
102
102
|
const [editing, setEditing] = useState(false);
|
|
103
103
|
const [editValue, setEditValue] = useState('');
|
|
@@ -188,7 +188,7 @@ export const Settings = ({ onClose, notify, hasWriteAccess = false, hasProjectCo
|
|
|
188
188
|
const agentMode = config.get('agentMode');
|
|
189
189
|
const agentCanRun = agentMode === 'on' && hasWriteAccess && hasProjectContext;
|
|
190
190
|
const agentStatusMessage = agentMode === 'on'
|
|
191
|
-
? (!
|
|
191
|
+
? (!isInProject
|
|
192
192
|
? '⚠️ No project detected - open terminal in a project folder and run codeep there'
|
|
193
193
|
: (!hasWriteAccess
|
|
194
194
|
? '⚠️ Agent needs permission - use /grant to allow project access'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.73",
|
|
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",
|