codeep 1.1.13 → 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.
- package/dist/renderer/main.js +58 -29
- package/package.json +1 -1
package/dist/renderer/main.js
CHANGED
|
@@ -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';
|
|
@@ -1485,7 +1485,8 @@ Commands (in chat):
|
|
|
1485
1485
|
// Check project permissions
|
|
1486
1486
|
const isProject = isProjectDirectory(projectPath);
|
|
1487
1487
|
let hasRead = hasReadPermission(projectPath);
|
|
1488
|
-
|
|
1488
|
+
// Always ask for permission if not already granted (for both projects and regular folders)
|
|
1489
|
+
const needsPermissionDialog = !hasRead;
|
|
1489
1490
|
// If already has permission, load context
|
|
1490
1491
|
if (hasRead) {
|
|
1491
1492
|
hasWriteAccess = hasWritePermission(projectPath);
|
|
@@ -1548,37 +1549,65 @@ Commands (in chat):
|
|
|
1548
1549
|
app.start();
|
|
1549
1550
|
// Show intro animation first (if terminal is large enough)
|
|
1550
1551
|
const showIntroAnimation = process.stdout.rows >= 20;
|
|
1551
|
-
const
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
projectContext =
|
|
1559
|
-
|
|
1560
|
-
projectContext.hasWriteAccess = false;
|
|
1561
|
-
setProjectContext(projectContext);
|
|
1562
|
-
}
|
|
1563
|
-
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);
|
|
1564
1561
|
}
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
}
|
|
1575
|
-
else {
|
|
1576
|
-
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);
|
|
1577
1571
|
}
|
|
1578
|
-
|
|
1579
|
-
|
|
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
|
+
},
|
|
1580
1605
|
});
|
|
1581
1606
|
}
|
|
1607
|
+
else if (needsPermissionDialog) {
|
|
1608
|
+
// Is a project (git or manual), just ask for permissions
|
|
1609
|
+
showPermissionAndContinue();
|
|
1610
|
+
}
|
|
1582
1611
|
else {
|
|
1583
1612
|
// No permission needed, show session picker directly
|
|
1584
1613
|
showSessionPickerInline();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.1.
|
|
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",
|