codeep 1.0.1 → 1.0.2
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/api/index.js +4 -4
- package/dist/app.js +34 -34
- package/dist/components/Login.js +4 -4
- package/dist/components/LogoutPicker.js +1 -1
- package/dist/components/MessageList.d.ts +1 -1
- package/dist/components/MessageList.js +1 -1
- package/dist/components/ProjectPermission.js +2 -2
- package/dist/components/SessionPicker.js +1 -1
- package/dist/components/Sessions.js +1 -1
- package/dist/components/Settings.js +2 -2
- package/dist/components/Status.js +1 -1
- package/dist/config/index.js +3 -3
- package/dist/config/providers.test.js +1 -1
- package/dist/index.js +2 -2
- package/dist/utils/agent.js +6 -6
- package/dist/utils/codeReview.js +1 -1
- package/dist/utils/context.js +1 -1
- package/dist/utils/export.d.ts +1 -1
- package/dist/utils/git.test.js +1 -1
- package/dist/utils/keychain.js +1 -1
- package/dist/utils/project.test.js +1 -1
- package/dist/utils/ratelimit.js +1 -1
- package/dist/utils/ratelimit.test.js +1 -1
- package/dist/utils/retry.test.js +1 -1
- package/dist/utils/tools.js +2 -2
- package/dist/utils/validation.test.js +1 -1
- package/dist/utils/verify.js +1 -1
- package/package.json +2 -2
package/dist/api/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { config, getApiKey } from '../config/index';
|
|
2
|
-
import { withRetry, isNetworkError, isTimeoutError } from '../utils/retry';
|
|
3
|
-
import { getProvider, getProviderBaseUrl, getProviderAuthHeader } from '../config/providers';
|
|
4
|
-
import { logApiRequest, logApiResponse } from '../utils/logger';
|
|
1
|
+
import { config, getApiKey } from '../config/index.js';
|
|
2
|
+
import { withRetry, isNetworkError, isTimeoutError } from '../utils/retry.js';
|
|
3
|
+
import { getProvider, getProviderBaseUrl, getProviderAuthHeader } from '../config/providers.js';
|
|
4
|
+
import { logApiRequest, logApiResponse } from '../utils/logger.js';
|
|
5
5
|
// Error messages by language
|
|
6
6
|
const ERROR_MESSAGES = {
|
|
7
7
|
en: {
|
package/dist/app.js
CHANGED
|
@@ -2,40 +2,40 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { Box, Text, useApp, useInput, useStdout } from 'ink';
|
|
4
4
|
import clipboardy from 'clipboardy';
|
|
5
|
-
import { logger } from './utils/logger';
|
|
6
|
-
import { Logo, IntroAnimation } from './components/Logo';
|
|
7
|
-
import { Loading } from './components/Loading';
|
|
8
|
-
import { getCodeBlock, clearCodeBlocks } from './components/Message';
|
|
9
|
-
import { ChatInput } from './components/Input';
|
|
10
|
-
import { Help } from './components/Help';
|
|
11
|
-
import { Status } from './components/Status';
|
|
12
|
-
import { Login } from './components/Login';
|
|
13
|
-
import { Sessions } from './components/Sessions';
|
|
14
|
-
import { SessionPicker } from './components/SessionPicker';
|
|
15
|
-
import { LogoutPicker } from './components/LogoutPicker';
|
|
16
|
-
import { Settings } from './components/Settings';
|
|
17
|
-
import { ProjectPermission } from './components/ProjectPermission';
|
|
18
|
-
import { Search } from './components/Search';
|
|
19
|
-
import { Export } from './components/Export';
|
|
20
|
-
import { MessageList } from './components/MessageList';
|
|
21
|
-
import { chat } from './api/index';
|
|
22
|
-
import { config, loadApiKey, loadAllApiKeys, PROTOCOLS, LANGUAGES, autoSaveSession, startNewSession, getCurrentSessionId, renameSession, deleteSession, hasReadPermission, hasWritePermission, setProjectPermission, setProvider, getCurrentProvider, getModelsForCurrentProvider, PROVIDERS } from './config/index';
|
|
23
|
-
import { getProviderList } from './config/providers';
|
|
24
|
-
import { isProjectDirectory, getProjectContext, detectFilePaths, readProjectFile, parseFileChanges, writeProjectFile, deleteProjectFile } from './utils/project';
|
|
25
|
-
import { logStartup, setLogProjectPath } from './utils/logger';
|
|
26
|
-
import { searchMessages } from './utils/search';
|
|
27
|
-
import { exportMessages, saveExport } from './utils/export';
|
|
28
|
-
import { checkForUpdates, formatVersionInfo, getCurrentVersion } from './utils/update';
|
|
29
|
-
import { getGitDiff, getGitStatus, suggestCommitMessage, formatDiffForDisplay } from './utils/git';
|
|
30
|
-
import { validateInput } from './utils/validation';
|
|
31
|
-
import { checkApiRateLimit, checkCommandRateLimit } from './utils/ratelimit';
|
|
32
|
-
import { runAgent, formatAgentResult, undoLastAction, undoAllActions, getRecentSessions } from './utils/agent';
|
|
33
|
-
import { autoCommitAgentChanges } from './utils/git';
|
|
34
|
-
import { saveContext, loadContext, clearContext, mergeContext } from './utils/context';
|
|
35
|
-
import { performCodeReview, formatReviewResult } from './utils/codeReview';
|
|
36
|
-
import { learnFromProject, addCustomRule, getLearningStatus } from './utils/learning';
|
|
37
|
-
import { getAllSkills, findSkill, formatSkillsList, formatSkillHelp, generateSkillPrompt, saveCustomSkill, deleteCustomSkill, parseSkillChain, parseSkillArgs, searchSkills, trackSkillUsage, getSkillStats } from './utils/skills';
|
|
38
|
-
import { AgentProgress, AgentSummary } from './components/AgentProgress';
|
|
5
|
+
import { logger } from './utils/logger.js';
|
|
6
|
+
import { Logo, IntroAnimation } from './components/Logo.js';
|
|
7
|
+
import { Loading } from './components/Loading.js';
|
|
8
|
+
import { getCodeBlock, clearCodeBlocks } from './components/Message.js';
|
|
9
|
+
import { ChatInput } from './components/Input.js';
|
|
10
|
+
import { Help } from './components/Help.js';
|
|
11
|
+
import { Status } from './components/Status.js';
|
|
12
|
+
import { Login } from './components/Login.js';
|
|
13
|
+
import { Sessions } from './components/Sessions.js';
|
|
14
|
+
import { SessionPicker } from './components/SessionPicker.js';
|
|
15
|
+
import { LogoutPicker } from './components/LogoutPicker.js';
|
|
16
|
+
import { Settings } from './components/Settings.js';
|
|
17
|
+
import { ProjectPermission } from './components/ProjectPermission.js';
|
|
18
|
+
import { Search } from './components/Search.js';
|
|
19
|
+
import { Export } from './components/Export.js';
|
|
20
|
+
import { MessageList } from './components/MessageList.js';
|
|
21
|
+
import { chat } from './api/index.js';
|
|
22
|
+
import { config, loadApiKey, loadAllApiKeys, PROTOCOLS, LANGUAGES, autoSaveSession, startNewSession, getCurrentSessionId, renameSession, deleteSession, hasReadPermission, hasWritePermission, setProjectPermission, setProvider, getCurrentProvider, getModelsForCurrentProvider, PROVIDERS } from './config/index.js';
|
|
23
|
+
import { getProviderList } from './config/providers.js';
|
|
24
|
+
import { isProjectDirectory, getProjectContext, detectFilePaths, readProjectFile, parseFileChanges, writeProjectFile, deleteProjectFile } from './utils/project.js';
|
|
25
|
+
import { logStartup, setLogProjectPath } from './utils/logger.js';
|
|
26
|
+
import { searchMessages } from './utils/search.js';
|
|
27
|
+
import { exportMessages, saveExport } from './utils/export.js';
|
|
28
|
+
import { checkForUpdates, formatVersionInfo, getCurrentVersion } from './utils/update.js';
|
|
29
|
+
import { getGitDiff, getGitStatus, suggestCommitMessage, formatDiffForDisplay } from './utils/git.js';
|
|
30
|
+
import { validateInput } from './utils/validation.js';
|
|
31
|
+
import { checkApiRateLimit, checkCommandRateLimit } from './utils/ratelimit.js';
|
|
32
|
+
import { runAgent, formatAgentResult, undoLastAction, undoAllActions, getRecentSessions } from './utils/agent.js';
|
|
33
|
+
import { autoCommitAgentChanges } from './utils/git.js';
|
|
34
|
+
import { saveContext, loadContext, clearContext, mergeContext } from './utils/context.js';
|
|
35
|
+
import { performCodeReview, formatReviewResult } from './utils/codeReview.js';
|
|
36
|
+
import { learnFromProject, addCustomRule, getLearningStatus } from './utils/learning.js';
|
|
37
|
+
import { getAllSkills, findSkill, formatSkillsList, formatSkillHelp, generateSkillPrompt, saveCustomSkill, deleteCustomSkill, parseSkillChain, parseSkillArgs, searchSkills, trackSkillUsage, getSkillStats } from './utils/skills.js';
|
|
38
|
+
import { AgentProgress, AgentSummary } from './components/AgentProgress.js';
|
|
39
39
|
export const App = () => {
|
|
40
40
|
const { exit } = useApp();
|
|
41
41
|
const { stdout } = useStdout();
|
package/dist/components/Login.js
CHANGED
|
@@ -3,10 +3,10 @@ import { useState } from 'react';
|
|
|
3
3
|
import { Text, Box, useInput } from 'ink';
|
|
4
4
|
import TextInput from 'ink-text-input';
|
|
5
5
|
import open from 'open';
|
|
6
|
-
import { setApiKey, setProvider } from '../config/index';
|
|
7
|
-
import { validateApiKey } from '../api/index';
|
|
8
|
-
import { Logo } from './Logo';
|
|
9
|
-
import { getProviderList } from '../config/providers';
|
|
6
|
+
import { setApiKey, setProvider } from '../config/index.js';
|
|
7
|
+
import { validateApiKey } from '../api/index.js';
|
|
8
|
+
import { Logo } from './Logo.js';
|
|
9
|
+
import { getProviderList } from '../config/providers.js';
|
|
10
10
|
const PROVIDER_URLS = {
|
|
11
11
|
'z.ai': 'https://z.ai/subscribe?ic=NXYNXZOV14',
|
|
12
12
|
'minimax': 'https://platform.minimax.io/subscribe/coding-plan?code=2lWvoWUhrp&source=link',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { Text, Box, useInput } from 'ink';
|
|
4
|
-
import { getConfiguredProviders, clearApiKey, getCurrentProvider } from '../config/index';
|
|
4
|
+
import { getConfiguredProviders, clearApiKey, getCurrentProvider } from '../config/index.js';
|
|
5
5
|
export const LogoutPicker = ({ onLogout, onLogoutAll, onCancel }) => {
|
|
6
6
|
const providers = getConfiguredProviders();
|
|
7
7
|
const currentProvider = getCurrentProvider();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Static } from 'ink';
|
|
3
|
-
import { MessageView } from './Message';
|
|
3
|
+
import { MessageView } from './Message.js';
|
|
4
4
|
export const MessageList = ({ messages, }) => {
|
|
5
5
|
// Use Static component to prevent messages from re-rendering on every keystroke
|
|
6
6
|
// This keeps the scroll position stable when typing in input field
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { Box, Text, useInput } from 'ink';
|
|
4
|
-
import { setProjectPermission } from '../config/index';
|
|
5
|
-
import { getProjectSummary } from '../utils/project';
|
|
4
|
+
import { setProjectPermission } from '../config/index.js';
|
|
5
|
+
import { getProjectSummary } from '../utils/project.js';
|
|
6
6
|
export const ProjectPermission = ({ projectPath, onComplete }) => {
|
|
7
7
|
const [step, setStep] = useState('read');
|
|
8
8
|
const [readGranted, setReadGranted] = useState(false);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useMemo } from 'react';
|
|
3
3
|
import { Text, Box, useInput } from 'ink';
|
|
4
|
-
import { listSessionsWithInfo, loadSession, startNewSession } from '../config/index';
|
|
4
|
+
import { listSessionsWithInfo, loadSession, startNewSession } from '../config/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Format relative time (e.g., "today", "yesterday", "3 days ago")
|
|
7
7
|
*/
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { Text, Box, useInput } from 'ink';
|
|
4
4
|
import TextInput from 'ink-text-input';
|
|
5
|
-
import { listSessions, saveSession, loadSession, deleteSession } from '../config/index';
|
|
5
|
+
import { listSessions, saveSession, loadSession, deleteSession } from '../config/index.js';
|
|
6
6
|
export const Sessions = ({ history, onLoad, onClose, onDelete, deleteMode = false, projectPath }) => {
|
|
7
7
|
const [name, setName] = useState('');
|
|
8
8
|
const [message, setMessage] = useState(deleteMode ? 'Select a session to delete (D or Enter)' : '');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { Box, Text, useInput } from 'ink';
|
|
4
|
-
import { config } from '../config/index';
|
|
5
|
-
import { updateRateLimits } from '../utils/ratelimit';
|
|
4
|
+
import { config } from '../config/index.js';
|
|
5
|
+
import { updateRateLimits } from '../utils/ratelimit.js';
|
|
6
6
|
const SETTINGS = [
|
|
7
7
|
{
|
|
8
8
|
key: 'temperature',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Text, Box } from 'ink';
|
|
3
|
-
import { config, getMaskedApiKey, getModelsForCurrentProvider, getCurrentProvider, PROTOCOLS, LANGUAGES } from '../config/index';
|
|
3
|
+
import { config, getMaskedApiKey, getModelsForCurrentProvider, getCurrentProvider, PROTOCOLS, LANGUAGES } from '../config/index.js';
|
|
4
4
|
export const Status = () => {
|
|
5
5
|
const model = config.get('model');
|
|
6
6
|
const protocol = config.get('protocol');
|
package/dist/config/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import Conf from 'conf';
|
|
|
2
2
|
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, unlinkSync, statSync } from 'fs';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { homedir } from 'os';
|
|
5
|
-
import { PROVIDERS, getProvider } from './providers';
|
|
6
|
-
import { logSession } from '../utils/logger';
|
|
5
|
+
import { PROVIDERS, getProvider } from './providers.js';
|
|
6
|
+
import { logSession } from '../utils/logger.js';
|
|
7
7
|
// Global sessions directory (fallback when not in a project)
|
|
8
8
|
const GLOBAL_SESSIONS_DIR = join(homedir(), '.codeep', 'sessions');
|
|
9
9
|
// Ensure global sessions directory exists
|
|
@@ -278,7 +278,7 @@ export function getModelsForCurrentProvider() {
|
|
|
278
278
|
return models;
|
|
279
279
|
}
|
|
280
280
|
// Re-export PROVIDERS for convenience
|
|
281
|
-
export { PROVIDERS } from './providers';
|
|
281
|
+
export { PROVIDERS } from './providers.js';
|
|
282
282
|
// Generate unique session ID
|
|
283
283
|
function generateSessionId() {
|
|
284
284
|
const now = new Date();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { PROVIDERS, getProvider, getProviderList, getProviderModels, getProviderBaseUrl, getProviderAuthHeader, } from './providers';
|
|
2
|
+
import { PROVIDERS, getProvider, getProviderList, getProviderModels, getProviderBaseUrl, getProviderAuthHeader, } from './providers.js';
|
|
3
3
|
describe('providers', () => {
|
|
4
4
|
describe('PROVIDERS constant', () => {
|
|
5
5
|
it('should have z.ai provider', () => {
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { render } from 'ink';
|
|
4
|
-
import { App } from './app';
|
|
5
|
-
import { getCurrentVersion } from './utils/update';
|
|
4
|
+
import { App } from './app.js';
|
|
5
|
+
import { getCurrentVersion } from './utils/update.js';
|
|
6
6
|
// Handle CLI flags
|
|
7
7
|
const args = process.argv.slice(2);
|
|
8
8
|
if (args.includes('--version') || args.includes('-v')) {
|
package/dist/utils/agent.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent loop - autonomous task execution
|
|
3
3
|
*/
|
|
4
|
-
import { parseToolCalls, executeTool, createActionLog, formatToolDefinitions, getOpenAITools, getAnthropicTools, parseOpenAIToolCalls, parseAnthropicToolCalls } from './tools';
|
|
5
|
-
import { config, getApiKey } from '../config/index';
|
|
6
|
-
import { getProviderBaseUrl, getProviderAuthHeader, supportsNativeTools } from '../config/providers';
|
|
7
|
-
import { startSession, endSession, undoLastAction, undoAllActions, getCurrentSession, getRecentSessions, formatSession } from './history';
|
|
8
|
-
import { runAllVerifications, formatErrorsForAgent, hasVerificationErrors, getVerificationSummary } from './verify';
|
|
9
|
-
import { gatherSmartContext, formatSmartContext, extractTargetFile } from './smartContext';
|
|
4
|
+
import { parseToolCalls, executeTool, createActionLog, formatToolDefinitions, getOpenAITools, getAnthropicTools, parseOpenAIToolCalls, parseAnthropicToolCalls } from './tools.js';
|
|
5
|
+
import { config, getApiKey } from '../config/index.js';
|
|
6
|
+
import { getProviderBaseUrl, getProviderAuthHeader, supportsNativeTools } from '../config/providers.js';
|
|
7
|
+
import { startSession, endSession, undoLastAction, undoAllActions, getCurrentSession, getRecentSessions, formatSession } from './history.js';
|
|
8
|
+
import { runAllVerifications, formatErrorsForAgent, hasVerificationErrors, getVerificationSummary } from './verify.js';
|
|
9
|
+
import { gatherSmartContext, formatSmartContext, extractTargetFile } from './smartContext.js';
|
|
10
10
|
const DEFAULT_OPTIONS = {
|
|
11
11
|
maxIterations: 20,
|
|
12
12
|
maxDuration: 5 * 60 * 1000, // 5 minutes
|
package/dist/utils/codeReview.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { existsSync, readFileSync, readdirSync } from 'fs';
|
|
5
5
|
import { join, extname, relative } from 'path';
|
|
6
|
-
import { getChangedFiles } from './git';
|
|
6
|
+
import { getChangedFiles } from './git.js';
|
|
7
7
|
// Common code patterns that indicate issues
|
|
8
8
|
const CODE_PATTERNS = [
|
|
9
9
|
// Security issues
|
package/dist/utils/context.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, unlinkSync } from 'fs';
|
|
5
5
|
import { join, basename } from 'path';
|
|
6
6
|
import { homedir } from 'os';
|
|
7
|
-
import { logger } from './logger';
|
|
7
|
+
import { logger } from './logger.js';
|
|
8
8
|
// Context storage directory
|
|
9
9
|
const CONTEXT_DIR = join(homedir(), '.codeep', 'contexts');
|
|
10
10
|
/**
|
package/dist/utils/export.d.ts
CHANGED
package/dist/utils/git.test.js
CHANGED
|
@@ -3,7 +3,7 @@ import { execSync } from 'child_process';
|
|
|
3
3
|
import { mkdirSync, rmSync, writeFileSync } from 'fs';
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import { tmpdir } from 'os';
|
|
6
|
-
import { isGitRepository, getGitStatus, getGitDiff, getChangedFiles, suggestCommitMessage, createCommit, stageAll, formatDiffForDisplay, } from './git';
|
|
6
|
+
import { isGitRepository, getGitStatus, getGitDiff, getChangedFiles, suggestCommitMessage, createCommit, stageAll, formatDiffForDisplay, } from './git.js';
|
|
7
7
|
// Create a temp directory for git tests
|
|
8
8
|
const TEST_DIR = join(tmpdir(), 'codeep-git-test-' + Date.now());
|
|
9
9
|
const NON_GIT_DIR = join(tmpdir(), 'codeep-non-git-test-' + Date.now());
|
package/dist/utils/keychain.js
CHANGED
|
@@ -2,7 +2,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
|
|
2
2
|
import { mkdirSync, rmSync, writeFileSync } from 'fs';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { tmpdir } from 'os';
|
|
5
|
-
import { isProjectDirectory, getProjectType, scanDirectory, generateTreeStructure, readProjectFile, deleteProjectFile, writeProjectFile, } from './project';
|
|
5
|
+
import { isProjectDirectory, getProjectType, scanDirectory, generateTreeStructure, readProjectFile, deleteProjectFile, writeProjectFile, } from './project.js';
|
|
6
6
|
const TEST_DIR = join(tmpdir(), 'codeep-project-test-' + Date.now());
|
|
7
7
|
describe('project utilities', () => {
|
|
8
8
|
beforeEach(() => {
|
package/dist/utils/ratelimit.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
2
|
-
import { checkApiRateLimit, checkCommandRateLimit, resetRateLimits, getRateLimitStatus, } from './ratelimit';
|
|
2
|
+
import { checkApiRateLimit, checkCommandRateLimit, resetRateLimits, getRateLimitStatus, } from './ratelimit.js';
|
|
3
3
|
describe('ratelimit utilities', () => {
|
|
4
4
|
beforeEach(() => {
|
|
5
5
|
// Reset rate limiters before each test
|
package/dist/utils/retry.test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect, vi } from 'vitest';
|
|
2
|
-
import { withRetry, isNetworkError, isTimeoutError, fetchWithTimeout, } from './retry';
|
|
2
|
+
import { withRetry, isNetworkError, isTimeoutError, fetchWithTimeout, } from './retry.js';
|
|
3
3
|
describe('retry utilities', () => {
|
|
4
4
|
describe('isNetworkError', () => {
|
|
5
5
|
it('should detect fetch TypeError', () => {
|
package/dist/utils/tools.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { existsSync, readdirSync, statSync, readFileSync, writeFileSync, unlinkSync, mkdirSync, rmSync } from 'fs';
|
|
5
5
|
import { join, dirname, relative, resolve, isAbsolute } from 'path';
|
|
6
|
-
import { executeCommand } from './shell';
|
|
7
|
-
import { recordWrite, recordEdit, recordDelete, recordMkdir, recordCommand } from './history';
|
|
6
|
+
import { executeCommand } from './shell.js';
|
|
7
|
+
import { recordWrite, recordEdit, recordDelete, recordMkdir, recordCommand } from './history.js';
|
|
8
8
|
// Tool definitions for system prompt
|
|
9
9
|
export const AGENT_TOOLS = {
|
|
10
10
|
read_file: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { validateInput, validateApiKey, validateCommandArgs, validateFilePath, sanitizeOutput, } from './validation';
|
|
2
|
+
import { validateInput, validateApiKey, validateCommandArgs, validateFilePath, sanitizeOutput, } from './validation.js';
|
|
3
3
|
describe('validation utilities', () => {
|
|
4
4
|
describe('validateInput', () => {
|
|
5
5
|
it('should reject empty input', () => {
|
package/dist/utils/verify.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
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",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "node --import tsx src/index.tsx",
|
|
12
|
-
"build": "tsc",
|
|
12
|
+
"build": "tsc && node scripts/fix-imports.js",
|
|
13
13
|
"start": "node dist/index.js",
|
|
14
14
|
"build:binary": "npm run build && pkg dist/index.js --targets node18-macos-arm64,node18-macos-x64,node18-linux-x64 --output bin/codeep",
|
|
15
15
|
"test": "vitest run",
|