codeep 1.0.104 → 1.0.105
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/config/index.js +10 -8
- package/package.json +1 -1
package/dist/config/index.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import Conf from 'conf';
|
|
2
2
|
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, unlinkSync, statSync } from 'fs';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
import { homedir } from 'os';
|
|
3
|
+
import { join, dirname } from 'path';
|
|
5
4
|
import { PROVIDERS, getProvider } from './providers.js';
|
|
6
5
|
import { logSession } from '../utils/logger.js';
|
|
7
|
-
//
|
|
8
|
-
const GLOBAL_SESSIONS_DIR = join(homedir(), '.codeep', 'sessions');
|
|
9
|
-
// Ensure global sessions directory exists
|
|
10
|
-
if (!existsSync(GLOBAL_SESSIONS_DIR)) {
|
|
11
|
-
mkdirSync(GLOBAL_SESSIONS_DIR, { recursive: true });
|
|
12
|
-
}
|
|
6
|
+
// We'll initialize GLOBAL_SESSIONS_DIR after config is created (to use config.path)
|
|
13
7
|
/**
|
|
14
8
|
* Get sessions directory - local .codeep/sessions/ if in project, otherwise global
|
|
15
9
|
*/
|
|
@@ -87,6 +81,14 @@ export const config = new Conf({
|
|
|
87
81
|
if (config.get('agentMode') === 'auto') {
|
|
88
82
|
config.set('agentMode', 'on');
|
|
89
83
|
}
|
|
84
|
+
// Global sessions directory - use same directory as conf package for cross-platform consistency
|
|
85
|
+
// config.path gives us something like ~/.config/codeep-nodejs/config.json, we use its parent
|
|
86
|
+
const GLOBAL_BASE_DIR = dirname(config.path);
|
|
87
|
+
const GLOBAL_SESSIONS_DIR = join(GLOBAL_BASE_DIR, 'sessions');
|
|
88
|
+
// Ensure global sessions directory exists
|
|
89
|
+
if (!existsSync(GLOBAL_SESSIONS_DIR)) {
|
|
90
|
+
mkdirSync(GLOBAL_SESSIONS_DIR, { recursive: true });
|
|
91
|
+
}
|
|
90
92
|
// In-memory cache for API keys (populated on first access)
|
|
91
93
|
const apiKeyCache = new Map();
|
|
92
94
|
export const LANGUAGES = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.105",
|
|
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",
|