codeep 1.0.2 → 1.0.4
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 +2 -4
- package/dist/components/Sessions.js +22 -5
- package/dist/config/index.js +15 -2
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -1208,10 +1208,8 @@ export const App = () => {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
setProjectContext(ctx);
|
|
1210
1210
|
if (permanent) {
|
|
1211
|
-
// Save permission to local .codeep/config.json
|
|
1212
|
-
|
|
1213
|
-
setProjectPermission(projectPath, true, false); // read only
|
|
1214
|
-
}
|
|
1211
|
+
// Save permission to local .codeep/config.json
|
|
1212
|
+
setProjectPermission(projectPath, true, writeGranted);
|
|
1215
1213
|
notify(writeGranted
|
|
1216
1214
|
? 'Project access granted (read + write, permanent)'
|
|
1217
1215
|
: 'Project access granted (read-only, permanent)');
|
|
@@ -47,15 +47,32 @@ export const Sessions = ({ history, onLoad, onClose, onDelete, deleteMode = fals
|
|
|
47
47
|
handleDelete();
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
// S = Save, L = Load, D = Delete
|
|
51
|
-
if (!deleteMode &&
|
|
50
|
+
// Ctrl+S = Save, Ctrl+L = Load, Ctrl+D = Delete, Enter = Save/Load depending on context
|
|
51
|
+
if (!deleteMode && key.ctrl && input === 's') {
|
|
52
52
|
handleSave();
|
|
53
|
+
return;
|
|
53
54
|
}
|
|
54
|
-
if (!deleteMode &&
|
|
55
|
+
if (!deleteMode && key.ctrl && input === 'l') {
|
|
55
56
|
handleLoad();
|
|
57
|
+
return;
|
|
56
58
|
}
|
|
57
|
-
if (
|
|
59
|
+
if (key.ctrl && input === 'd') {
|
|
58
60
|
handleDelete();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
// Enter key behavior
|
|
64
|
+
if (!deleteMode && key.return) {
|
|
65
|
+
// If name is filled, try to save or load
|
|
66
|
+
if (name.trim()) {
|
|
67
|
+
// Check if session exists - if yes, load it, if no, save current
|
|
68
|
+
if (sessions.includes(name.trim())) {
|
|
69
|
+
handleLoad();
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
handleSave();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
59
76
|
}
|
|
60
77
|
});
|
|
61
78
|
const handleSave = () => {
|
|
@@ -98,5 +115,5 @@ export const Sessions = ({ history, onLoad, onClose, onDelete, deleteMode = fals
|
|
|
98
115
|
setConfirmDelete(sessionName);
|
|
99
116
|
setMessage(`Delete "${sessionName}"? (Y/N)`);
|
|
100
117
|
};
|
|
101
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#f02a30", padding: 1, children: [_jsx(Text, { color: "#f02a30", bold: true, children: deleteMode ? 'Delete Session' : 'Sessions' }), _jsx(Text, { children: " " }), !deleteMode && (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsx(Text, { color: "#f02a30", children: "Name: " }), _jsx(TextInput, { value: name, onChange: setName, placeholder: "session name..." })] }), _jsx(Text, { children: " " }), _jsxs(Text, { children: ["Actions: ", _jsx(Text, { color: "#f02a30", children: "S" }), "=Save ", _jsx(Text, { color: "#f02a30", children: "L" }), "=Load ", _jsx(Text, { color: "#f02a30", children: "D" }), "=Delete ", _jsx(Text, { color: "#f02a30", children: "Esc" }), "=Close"] })] })), deleteMode && (_jsx(_Fragment, { children: _jsxs(Text, { children: ["Actions: ", _jsx(Text, { color: "#f02a30", children: "Enter/D" }), "=Delete ", _jsx(Text, { color: "#f02a30", children: "Esc" }), "=Cancel"] }) })), sessions.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { children: "Saved sessions (\u2191/\u2193 to select):" }), sessions.map((s, i) => (_jsxs(Text, { children: [i === selectedIndex ? _jsx(Text, { color: "#f02a30", children: "\u25B8 " }) : ' ', _jsx(Text, { color: i === selectedIndex ? '#f02a30' : undefined, children: s })] }, s)))] })), message && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: "cyan", children: message })] }))] }));
|
|
118
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: "#f02a30", padding: 1, children: [_jsx(Text, { color: "#f02a30", bold: true, children: deleteMode ? 'Delete Session' : 'Sessions' }), _jsx(Text, { children: " " }), !deleteMode && (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsx(Text, { color: "#f02a30", children: "Name: " }), _jsx(TextInput, { value: name, onChange: setName, placeholder: "session name..." })] }), _jsx(Text, { children: " " }), _jsxs(Text, { children: ["Actions: ", _jsx(Text, { color: "#f02a30", children: "Ctrl+S" }), "=Save ", _jsx(Text, { color: "#f02a30", children: "Ctrl+L" }), "=Load ", _jsx(Text, { color: "#f02a30", children: "Ctrl+D" }), "=Delete ", _jsx(Text, { color: "#f02a30", children: "Enter" }), "=Save/Load ", _jsx(Text, { color: "#f02a30", children: "Esc" }), "=Close"] })] })), deleteMode && (_jsx(_Fragment, { children: _jsxs(Text, { children: ["Actions: ", _jsx(Text, { color: "#f02a30", children: "Enter/Ctrl+D" }), "=Delete ", _jsx(Text, { color: "#f02a30", children: "Esc" }), "=Cancel"] }) })), sessions.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { children: "Saved sessions (\u2191/\u2193 to select):" }), sessions.map((s, i) => (_jsxs(Text, { children: [i === selectedIndex ? _jsx(Text, { color: "#f02a30", children: "\u25B8 " }) : ' ', _jsx(Text, { color: i === selectedIndex ? '#f02a30' : undefined, children: s })] }, s)))] })), message && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: "cyan", children: message })] }))] }));
|
|
102
119
|
};
|
package/dist/config/index.js
CHANGED
|
@@ -36,10 +36,23 @@ function getLocalConfigPath(projectPath) {
|
|
|
36
36
|
return join(configDir, 'config.json');
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Check if directory is a project
|
|
39
|
+
* Check if directory is a project
|
|
40
|
+
* Looks for common project indicators: package.json, pyproject.toml, Cargo.toml, go.mod, composer.json, etc.
|
|
40
41
|
*/
|
|
41
42
|
function isProjectDirectory(path) {
|
|
42
|
-
|
|
43
|
+
const projectFiles = [
|
|
44
|
+
'package.json', // Node.js
|
|
45
|
+
'pyproject.toml', // Python (Poetry)
|
|
46
|
+
'requirements.txt', // Python (pip)
|
|
47
|
+
'setup.py', // Python
|
|
48
|
+
'Cargo.toml', // Rust
|
|
49
|
+
'go.mod', // Go
|
|
50
|
+
'composer.json', // PHP
|
|
51
|
+
'pom.xml', // Java (Maven)
|
|
52
|
+
'build.gradle', // Java (Gradle)
|
|
53
|
+
'.git', // Git repository
|
|
54
|
+
];
|
|
55
|
+
return projectFiles.some(file => existsSync(join(path, file)));
|
|
43
56
|
}
|
|
44
57
|
export const config = new Conf({
|
|
45
58
|
projectName: 'codeep',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
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",
|