codeep 1.0.70 → 1.0.72

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) {
@@ -134,7 +136,7 @@ export const App = () => {
134
136
  if (agentMode === 'on') {
135
137
  setTimeout(() => {
136
138
  setNotificationDuration(8000);
137
- setNotification('⚠️ Agent Mode ON: Not a project folder (no package.json, etc). Run codeep inside a project.');
139
+ setNotification('⚠️ Agent Mode ON: No project detected here. Open terminal in a project folder and run codeep there.');
138
140
  }, 500);
139
141
  }
140
142
  }
@@ -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 (!projectContext) {
417
- notify('⚠️ Agent Mode ON: Not a project folder. Run codeep inside a project directory.', 8000);
418
+ if (!isInProject) {
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);
@@ -627,7 +632,7 @@ export const App = () => {
627
632
  case '/grant': {
628
633
  // Grant write permission for agent mode
629
634
  if (!projectContext) {
630
- notify('Not in a project directory. Run codeep inside a project folder.');
635
+ notify('No project detected. Open terminal in a project folder and run codeep there.');
631
636
  break;
632
637
  }
633
638
  if (hasWriteAccess) {
@@ -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 (needs ", !projectContext ? 'project folder' : 'permission - /grant', ")"] }))) : (_jsx(Text, { color: "gray", children: "Agent: Manual (use /agent)" })) })] })] }));
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 }) => {
@@ -4,6 +4,7 @@ interface SettingsProps {
4
4
  notify: (msg: string) => void;
5
5
  hasWriteAccess?: boolean;
6
6
  hasProjectContext?: boolean;
7
+ isInProject?: boolean;
7
8
  }
8
9
  export declare const Settings: React.FC<SettingsProps>;
9
10
  export {};
@@ -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,10 +188,10 @@ 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
- ? (!hasProjectContext
192
- ? '⚠️ Not a project folder - run codeep inside a project directory'
191
+ ? (!isInProject
192
+ ? '⚠️ No project detected - open terminal in a project folder and run codeep there'
193
193
  : (!hasWriteAccess
194
- ? '⚠️ Needs write permission - use /grant to enable agent'
194
+ ? '⚠️ Agent needs permission - use /grant to allow project access'
195
195
  : '✓ Agent will run automatically on every message'))
196
196
  : 'ℹ️ Manual mode - use /agent <task> to run agent';
197
197
  return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#f02a30", padding: 1, 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" })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.0.70",
3
+ "version": "1.0.72",
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",