codeep 2.20.0 → 2.22.0

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.
Files changed (38) hide show
  1. package/dist/acp/server.js +8 -4
  2. package/dist/api/index.js +26 -19
  3. package/dist/config/index.d.ts +20 -0
  4. package/dist/config/index.js +32 -0
  5. package/dist/renderer/App.js +0 -1
  6. package/dist/renderer/Input.d.ts +0 -1
  7. package/dist/renderer/Input.js +0 -1
  8. package/dist/renderer/commands/registry.js +1 -0
  9. package/dist/renderer/commands.js +19 -3
  10. package/dist/renderer/components/Export.js +0 -2
  11. package/dist/renderer/components/Login.d.ts +0 -1
  12. package/dist/renderer/components/Login.js +0 -2
  13. package/dist/renderer/components/Logout.js +0 -2
  14. package/dist/renderer/components/Settings.d.ts +3 -0
  15. package/dist/renderer/components/Settings.js +0 -12
  16. package/dist/renderer/main.js +35 -56
  17. package/dist/utils/agent.d.ts +7 -0
  18. package/dist/utils/agent.js +102 -6
  19. package/dist/utils/auditLog.d.ts +93 -0
  20. package/dist/utils/auditLog.js +217 -0
  21. package/dist/utils/codeepCloud.d.ts +30 -4
  22. package/dist/utils/codeepCloud.js +71 -19
  23. package/dist/utils/diffPreview.js +0 -1
  24. package/dist/utils/git.js +0 -1
  25. package/dist/utils/headlessReview.d.ts +9 -1
  26. package/dist/utils/headlessReview.js +77 -3
  27. package/dist/utils/mcpStreamableHttp.d.ts +0 -1
  28. package/dist/utils/mcpStreamableHttp.js +0 -3
  29. package/dist/utils/personalities.js +0 -1
  30. package/dist/utils/reviewFix.d.ts +65 -0
  31. package/dist/utils/reviewFix.js +141 -0
  32. package/dist/utils/skillBundles.js +0 -4
  33. package/dist/utils/smartContext.js +0 -18
  34. package/dist/version.d.ts +1 -1
  35. package/dist/version.js +1 -1
  36. package/package.json +2 -2
  37. package/dist/renderer/components/Permission.d.ts +0 -24
  38. package/dist/renderer/components/Permission.js +0 -113
@@ -1,113 +0,0 @@
1
- /**
2
- * Permission screen for granting folder access
3
- */
4
- import { fg, style } from '../ansi.js';
5
- import { createBox, centerBox } from './Box.js';
6
- // Primary color: #f02a30 (Codeep red)
7
- const PRIMARY_COLOR = fg.rgb(240, 42, 48);
8
- const PRIMARY_BRIGHT = fg.rgb(255, 80, 85);
9
- /**
10
- * Render permission screen
11
- */
12
- export function renderPermissionScreen(screen, options, selectedIndex) {
13
- const { width, height } = screen.getSize();
14
- screen.clear();
15
- // Title
16
- const title = '═══ Folder Access ═══';
17
- const titleX = Math.floor((width - title.length) / 2);
18
- screen.write(titleX, 1, title, PRIMARY_COLOR + style.bold);
19
- // Box
20
- const boxWidth = Math.min(60, width - 4);
21
- const boxHeight = 14;
22
- const { x: boxX, y: boxY } = centerBox(width, height, boxWidth, boxHeight);
23
- const boxLines = createBox({
24
- x: boxX,
25
- y: boxY,
26
- width: boxWidth,
27
- height: boxHeight,
28
- style: 'rounded',
29
- borderColor: PRIMARY_COLOR,
30
- });
31
- for (const line of boxLines) {
32
- screen.writeLine(line.y, line.text, line.style);
33
- }
34
- // Content
35
- const contentX = boxX + 3;
36
- let contentY = boxY + 2;
37
- // Project path
38
- const displayPath = truncatePath(options.projectPath, boxWidth - 8);
39
- screen.write(contentX, contentY, 'Project:', fg.gray);
40
- screen.write(contentX + 9, contentY, displayPath, fg.white);
41
- contentY += 2;
42
- // Description
43
- if (options.isProject) {
44
- screen.write(contentX, contentY, 'This looks like a project folder.', fg.white);
45
- }
46
- else {
47
- screen.write(contentX, contentY, 'Grant access to enable AI assistance.', fg.white);
48
- }
49
- contentY += 2;
50
- // Options
51
- const permissionOptions = [
52
- {
53
- level: 'read',
54
- label: 'Read Only',
55
- desc: 'AI can read files, no modifications'
56
- },
57
- {
58
- level: 'write',
59
- label: 'Read & Write',
60
- desc: 'AI can read and modify files (Agent mode)'
61
- },
62
- {
63
- level: 'none',
64
- label: 'No Access',
65
- desc: 'Chat without project context'
66
- },
67
- ];
68
- for (let i = 0; i < permissionOptions.length; i++) {
69
- const opt = permissionOptions[i];
70
- const isSelected = i === selectedIndex;
71
- const prefix = isSelected ? '► ' : ' ';
72
- // Label
73
- const labelStyle = isSelected ? PRIMARY_BRIGHT + style.bold : fg.white;
74
- screen.write(contentX, contentY, prefix + opt.label, labelStyle);
75
- // Description on same line
76
- const descX = contentX + 20;
77
- screen.write(descX, contentY, opt.desc, fg.gray);
78
- contentY++;
79
- }
80
- // Current permission indicator
81
- contentY++;
82
- if (options.currentPermission !== 'none') {
83
- screen.write(contentX, contentY, `Current: ${options.currentPermission}`, fg.yellow);
84
- }
85
- // Footer
86
- const footerY = height - 2;
87
- screen.write(2, footerY, '↑↓ Navigate | Enter Select | Esc Skip', fg.gray);
88
- screen.showCursor(false);
89
- screen.fullRender();
90
- }
91
- /**
92
- * Get permission options array for easy indexing
93
- */
94
- export function getPermissionOptions() {
95
- return ['read', 'write', 'none'];
96
- }
97
- /**
98
- * Truncate path for display
99
- */
100
- export function truncatePath(path, maxLen) {
101
- if (path.length <= maxLen)
102
- return path;
103
- const parts = path.split('/');
104
- let result = parts[parts.length - 1];
105
- for (let i = parts.length - 2; i >= 0; i--) {
106
- const newResult = parts[i] + '/' + result;
107
- if (newResult.length + 3 > maxLen) {
108
- return '.../' + result;
109
- }
110
- result = newResult;
111
- }
112
- return result;
113
- }