codeep 1.1.14 → 1.1.15

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.
@@ -11,7 +11,7 @@ import { renderPermissionScreen, getPermissionOptions } from './components/Permi
11
11
  // Intro animation is now handled by App.startIntro()
12
12
  import { chat, setProjectContext } from '../api/index.js';
13
13
  import { runAgent } from '../utils/agent.js';
14
- import { config, loadApiKey, loadAllApiKeys, getCurrentProvider, getModelsForCurrentProvider, PROTOCOLS, LANGUAGES, setProvider, setApiKey, clearApiKey, autoSaveSession, saveSession, startNewSession, getCurrentSessionId, loadSession, listSessionsWithInfo, deleteSession, renameSession, hasReadPermission, hasWritePermission, setProjectPermission, } from '../config/index.js';
14
+ import { config, loadApiKey, loadAllApiKeys, getCurrentProvider, getModelsForCurrentProvider, PROTOCOLS, LANGUAGES, setProvider, setApiKey, clearApiKey, autoSaveSession, saveSession, startNewSession, getCurrentSessionId, loadSession, listSessionsWithInfo, deleteSession, renameSession, hasReadPermission, hasWritePermission, setProjectPermission, initializeAsProject, isManuallyInitializedProject, } from '../config/index.js';
15
15
  import { isProjectDirectory, getProjectContext } from '../utils/project.js';
16
16
  import { getCurrentVersion } from '../utils/update.js';
17
17
  import { getProviderList } from '../config/providers.js';
@@ -1549,37 +1549,65 @@ Commands (in chat):
1549
1549
  app.start();
1550
1550
  // Show intro animation first (if terminal is large enough)
1551
1551
  const showIntroAnimation = process.stdout.rows >= 20;
1552
- const continueStartup = () => {
1553
- // Show permission dialog inline if needed
1554
- if (needsPermissionDialog) {
1555
- app.showPermission(projectPath, isProject, (permission) => {
1556
- if (permission === 'read') {
1557
- setProjectPermission(projectPath, true, false);
1558
- hasWriteAccess = false;
1559
- projectContext = getProjectContext(projectPath);
1560
- if (projectContext) {
1561
- projectContext.hasWriteAccess = false;
1562
- setProjectContext(projectContext);
1563
- }
1564
- app.notify('Read-only access granted');
1552
+ const showPermissionAndContinue = () => {
1553
+ app.showPermission(projectPath, isProject, (permission) => {
1554
+ if (permission === 'read') {
1555
+ setProjectPermission(projectPath, true, false);
1556
+ hasWriteAccess = false;
1557
+ projectContext = getProjectContext(projectPath);
1558
+ if (projectContext) {
1559
+ projectContext.hasWriteAccess = false;
1560
+ setProjectContext(projectContext);
1565
1561
  }
1566
- else if (permission === 'write') {
1567
- setProjectPermission(projectPath, true, true);
1568
- hasWriteAccess = true;
1569
- projectContext = getProjectContext(projectPath);
1570
- if (projectContext) {
1571
- projectContext.hasWriteAccess = true;
1572
- setProjectContext(projectContext);
1573
- }
1574
- app.notify('Read & Write access granted');
1575
- }
1576
- else {
1577
- app.notify('No project access - chat only mode');
1562
+ app.notify('Read-only access granted');
1563
+ }
1564
+ else if (permission === 'write') {
1565
+ setProjectPermission(projectPath, true, true);
1566
+ hasWriteAccess = true;
1567
+ projectContext = getProjectContext(projectPath);
1568
+ if (projectContext) {
1569
+ projectContext.hasWriteAccess = true;
1570
+ setProjectContext(projectContext);
1578
1571
  }
1579
- // After permission, show session picker
1580
- showSessionPickerInline();
1572
+ app.notify('Read & Write access granted');
1573
+ }
1574
+ else {
1575
+ app.notify('No project access - chat only mode');
1576
+ }
1577
+ // After permission, show session picker
1578
+ showSessionPickerInline();
1579
+ });
1580
+ };
1581
+ const continueStartup = () => {
1582
+ // If not a git project and not manually initialized, ask if user wants to set it as project
1583
+ const isManualProject = isManuallyInitializedProject(projectPath);
1584
+ if (needsPermissionDialog && !isProject && !isManualProject) {
1585
+ // Ask user if they want to use this folder as a project
1586
+ app.showConfirm({
1587
+ title: 'Set as Project?',
1588
+ message: [
1589
+ `Current folder: ${projectPath}`,
1590
+ '',
1591
+ 'This folder is not a Git repository.',
1592
+ 'Would you like to use it as a Codeep project?',
1593
+ ],
1594
+ confirmLabel: 'Yes, set as project',
1595
+ cancelLabel: 'No, chat only',
1596
+ onConfirm: () => {
1597
+ initializeAsProject(projectPath);
1598
+ app.notify('Folder initialized as project');
1599
+ showPermissionAndContinue();
1600
+ },
1601
+ onCancel: () => {
1602
+ app.notify('Chat only mode - no project context');
1603
+ showSessionPickerInline();
1604
+ },
1581
1605
  });
1582
1606
  }
1607
+ else if (needsPermissionDialog) {
1608
+ // Is a project (git or manual), just ask for permissions
1609
+ showPermissionAndContinue();
1610
+ }
1583
1611
  else {
1584
1612
  // No permission needed, show session picker directly
1585
1613
  showSessionPickerInline();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
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",