acmecode 1.0.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.
- package/.acmecode/config.json +6 -0
- package/README.md +124 -0
- package/dist/agent/index.js +161 -0
- package/dist/cli/bin/acmecode.js +3 -0
- package/dist/cli/package.json +25 -0
- package/dist/cli/src/index.d.ts +1 -0
- package/dist/cli/src/index.js +53 -0
- package/dist/config/index.js +92 -0
- package/dist/context/index.js +30 -0
- package/dist/core/src/agent/index.d.ts +52 -0
- package/dist/core/src/agent/index.js +476 -0
- package/dist/core/src/config/index.d.ts +83 -0
- package/dist/core/src/config/index.js +318 -0
- package/dist/core/src/context/index.d.ts +1 -0
- package/dist/core/src/context/index.js +30 -0
- package/dist/core/src/llm/provider.d.ts +27 -0
- package/dist/core/src/llm/provider.js +202 -0
- package/dist/core/src/llm/vision.d.ts +7 -0
- package/dist/core/src/llm/vision.js +37 -0
- package/dist/core/src/mcp/index.d.ts +10 -0
- package/dist/core/src/mcp/index.js +84 -0
- package/dist/core/src/prompt/anthropic.d.ts +1 -0
- package/dist/core/src/prompt/anthropic.js +32 -0
- package/dist/core/src/prompt/architect.d.ts +1 -0
- package/dist/core/src/prompt/architect.js +17 -0
- package/dist/core/src/prompt/autopilot.d.ts +1 -0
- package/dist/core/src/prompt/autopilot.js +18 -0
- package/dist/core/src/prompt/beast.d.ts +1 -0
- package/dist/core/src/prompt/beast.js +83 -0
- package/dist/core/src/prompt/gemini.d.ts +1 -0
- package/dist/core/src/prompt/gemini.js +45 -0
- package/dist/core/src/prompt/index.d.ts +18 -0
- package/dist/core/src/prompt/index.js +239 -0
- package/dist/core/src/prompt/zen.d.ts +1 -0
- package/dist/core/src/prompt/zen.js +13 -0
- package/dist/core/src/session/index.d.ts +18 -0
- package/dist/core/src/session/index.js +97 -0
- package/dist/core/src/skills/index.d.ts +6 -0
- package/dist/core/src/skills/index.js +72 -0
- package/dist/core/src/tools/batch.d.ts +2 -0
- package/dist/core/src/tools/batch.js +65 -0
- package/dist/core/src/tools/browser.d.ts +7 -0
- package/dist/core/src/tools/browser.js +86 -0
- package/dist/core/src/tools/edit.d.ts +11 -0
- package/dist/core/src/tools/edit.js +312 -0
- package/dist/core/src/tools/index.d.ts +13 -0
- package/dist/core/src/tools/index.js +980 -0
- package/dist/core/src/tools/lsp-client.d.ts +11 -0
- package/dist/core/src/tools/lsp-client.js +224 -0
- package/dist/index.js +41 -0
- package/dist/llm/provider.js +34 -0
- package/dist/mcp/index.js +84 -0
- package/dist/session/index.js +74 -0
- package/dist/skills/index.js +32 -0
- package/dist/tools/index.js +96 -0
- package/dist/tui/App.js +297 -0
- package/dist/tui/Spinner.js +16 -0
- package/dist/tui/TextInput.js +98 -0
- package/dist/tui/src/App.d.ts +11 -0
- package/dist/tui/src/App.js +1211 -0
- package/dist/tui/src/CatLogo.d.ts +10 -0
- package/dist/tui/src/CatLogo.js +99 -0
- package/dist/tui/src/OptionList.d.ts +15 -0
- package/dist/tui/src/OptionList.js +60 -0
- package/dist/tui/src/Spinner.d.ts +7 -0
- package/dist/tui/src/Spinner.js +18 -0
- package/dist/tui/src/TextInput.d.ts +28 -0
- package/dist/tui/src/TextInput.js +139 -0
- package/dist/tui/src/Tips.d.ts +2 -0
- package/dist/tui/src/Tips.js +62 -0
- package/dist/tui/src/Toast.d.ts +19 -0
- package/dist/tui/src/Toast.js +39 -0
- package/dist/tui/src/TodoItem.d.ts +7 -0
- package/dist/tui/src/TodoItem.js +21 -0
- package/dist/tui/src/i18n.d.ts +172 -0
- package/dist/tui/src/i18n.js +189 -0
- package/dist/tui/src/markdown.d.ts +6 -0
- package/dist/tui/src/markdown.js +356 -0
- package/dist/tui/src/theme.d.ts +31 -0
- package/dist/tui/src/theme.js +239 -0
- package/output.txt +0 -0
- package/package.json +44 -0
- package/packages/cli/package.json +25 -0
- package/packages/cli/src/index.ts +59 -0
- package/packages/cli/tsconfig.json +26 -0
- package/packages/core/package.json +39 -0
- package/packages/core/src/agent/index.ts +588 -0
- package/packages/core/src/config/index.ts +383 -0
- package/packages/core/src/context/index.ts +34 -0
- package/packages/core/src/llm/provider.ts +237 -0
- package/packages/core/src/llm/vision.ts +43 -0
- package/packages/core/src/mcp/index.ts +110 -0
- package/packages/core/src/prompt/anthropic.ts +32 -0
- package/packages/core/src/prompt/architect.ts +17 -0
- package/packages/core/src/prompt/autopilot.ts +18 -0
- package/packages/core/src/prompt/beast.ts +83 -0
- package/packages/core/src/prompt/gemini.ts +45 -0
- package/packages/core/src/prompt/index.ts +267 -0
- package/packages/core/src/prompt/zen.ts +13 -0
- package/packages/core/src/session/index.ts +129 -0
- package/packages/core/src/skills/index.ts +86 -0
- package/packages/core/src/tools/batch.ts +73 -0
- package/packages/core/src/tools/browser.ts +95 -0
- package/packages/core/src/tools/edit.ts +317 -0
- package/packages/core/src/tools/index.ts +1112 -0
- package/packages/core/src/tools/lsp-client.ts +303 -0
- package/packages/core/tsconfig.json +19 -0
- package/packages/tui/package.json +24 -0
- package/packages/tui/src/App.tsx +1702 -0
- package/packages/tui/src/CatLogo.tsx +134 -0
- package/packages/tui/src/OptionList.tsx +95 -0
- package/packages/tui/src/Spinner.tsx +28 -0
- package/packages/tui/src/TextInput.tsx +202 -0
- package/packages/tui/src/Tips.tsx +64 -0
- package/packages/tui/src/Toast.tsx +60 -0
- package/packages/tui/src/TodoItem.tsx +29 -0
- package/packages/tui/src/i18n.ts +203 -0
- package/packages/tui/src/markdown.ts +403 -0
- package/packages/tui/src/theme.ts +287 -0
- package/packages/tui/tsconfig.json +24 -0
- package/tsconfig.json +18 -0
- package/vscode-acmecode/.vscodeignore +11 -0
- package/vscode-acmecode/README.md +57 -0
- package/vscode-acmecode/esbuild.js +46 -0
- package/vscode-acmecode/images/button-dark.svg +5 -0
- package/vscode-acmecode/images/button-light.svg +5 -0
- package/vscode-acmecode/images/icon.png +1 -0
- package/vscode-acmecode/package-lock.json +490 -0
- package/vscode-acmecode/package.json +87 -0
- package/vscode-acmecode/src/extension.ts +128 -0
- package/vscode-acmecode/tsconfig.json +16 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import pc from "picocolors";
|
|
2
|
+
import { t } from "./i18n.js";
|
|
3
|
+
import {
|
|
4
|
+
loadThemeConfig,
|
|
5
|
+
saveGlobalThemeConfig,
|
|
6
|
+
} from "@acmecode/core/config/index.js";
|
|
7
|
+
|
|
8
|
+
// ── Theme color definitions ──
|
|
9
|
+
export interface ThemeColors {
|
|
10
|
+
primary: (text: string) => string;
|
|
11
|
+
secondary: (text: string) => string;
|
|
12
|
+
muted: (text: string) => string;
|
|
13
|
+
success: (text: string) => string;
|
|
14
|
+
danger: (text: string) => string;
|
|
15
|
+
warning: (text: string) => string;
|
|
16
|
+
info: (text: string) => string;
|
|
17
|
+
highlight: (text: string) => string;
|
|
18
|
+
border: string;
|
|
19
|
+
borderDim: string;
|
|
20
|
+
logo: string;
|
|
21
|
+
/** Hex color for the header card background */
|
|
22
|
+
bgHeader: string;
|
|
23
|
+
/** Hex color for the input card background */
|
|
24
|
+
bgInput: string;
|
|
25
|
+
/** Hex color for the accent bar on the left of the input */
|
|
26
|
+
accentIdle: string;
|
|
27
|
+
/** Hex color for the accent bar when generating */
|
|
28
|
+
accentBusy: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Helper: ANSI 256-color foreground
|
|
32
|
+
const c256 = (n: number) => (text: string) => `\x1b[38;5;${n}m${text}\x1b[0m`;
|
|
33
|
+
|
|
34
|
+
// ── Built-in Themes ──
|
|
35
|
+
const themes: Record<string, ThemeColors> = {
|
|
36
|
+
dark: {
|
|
37
|
+
primary: pc.cyan,
|
|
38
|
+
secondary: pc.magenta,
|
|
39
|
+
muted: pc.gray,
|
|
40
|
+
success: pc.green,
|
|
41
|
+
danger: pc.red,
|
|
42
|
+
warning: pc.yellow,
|
|
43
|
+
info: pc.blue,
|
|
44
|
+
highlight: pc.bold,
|
|
45
|
+
border: "─",
|
|
46
|
+
borderDim: "┄",
|
|
47
|
+
logo: `${pc.cyan(pc.bold("AcmeCode"))} ${pc.gray("v1.0")}`,
|
|
48
|
+
bgHeader: "#141414",
|
|
49
|
+
bgInput: "#1e1e1e",
|
|
50
|
+
accentIdle: "cyan",
|
|
51
|
+
accentBusy: "yellow",
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
dracula: {
|
|
55
|
+
primary: c256(141), // purple
|
|
56
|
+
secondary: c256(212), // pink
|
|
57
|
+
muted: c256(103), // comment gray
|
|
58
|
+
success: c256(84), // green
|
|
59
|
+
danger: c256(203), // red
|
|
60
|
+
warning: c256(228), // yellow
|
|
61
|
+
info: c256(117), // cyan
|
|
62
|
+
highlight: pc.bold,
|
|
63
|
+
border: "─",
|
|
64
|
+
borderDim: "┄",
|
|
65
|
+
logo: `\x1b[38;5;141m\x1b[1mAcmeCode\x1b[0m \x1b[38;5;103mv1.0\x1b[0m`,
|
|
66
|
+
bgHeader: "#21222c",
|
|
67
|
+
bgInput: "#282a36",
|
|
68
|
+
accentIdle: "#bd93f9",
|
|
69
|
+
accentBusy: "#ffb86c",
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
tokyonight: {
|
|
73
|
+
primary: c256(111), // blue
|
|
74
|
+
secondary: c256(176), // magenta
|
|
75
|
+
muted: c256(60), // dark comment
|
|
76
|
+
success: c256(115), // green
|
|
77
|
+
danger: c256(210), // red
|
|
78
|
+
warning: c256(222), // yellow
|
|
79
|
+
info: c256(81), // cyan
|
|
80
|
+
highlight: pc.bold,
|
|
81
|
+
border: "─",
|
|
82
|
+
borderDim: "┄",
|
|
83
|
+
logo: `\x1b[38;5;111m\x1b[1mAcmeCode\x1b[0m \x1b[38;5;60mv1.0\x1b[0m`,
|
|
84
|
+
bgHeader: "#16161e",
|
|
85
|
+
bgInput: "#1a1b26",
|
|
86
|
+
accentIdle: "#7aa2f7",
|
|
87
|
+
accentBusy: "#e0af68",
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
nord: {
|
|
91
|
+
primary: c256(110), // frost blue
|
|
92
|
+
secondary: c256(139), // purple
|
|
93
|
+
muted: c256(59), // polar night
|
|
94
|
+
success: c256(108), // aurora green
|
|
95
|
+
danger: c256(174), // aurora red
|
|
96
|
+
warning: c256(179), // aurora yellow
|
|
97
|
+
info: c256(67), // frost darker
|
|
98
|
+
highlight: pc.bold,
|
|
99
|
+
border: "─",
|
|
100
|
+
borderDim: "┄",
|
|
101
|
+
logo: `\x1b[38;5;110m\x1b[1mAcmeCode\x1b[0m \x1b[38;5;59mv1.0\x1b[0m`,
|
|
102
|
+
bgHeader: "#2e3440",
|
|
103
|
+
bgInput: "#3b4252",
|
|
104
|
+
accentIdle: "#88c0d0",
|
|
105
|
+
accentBusy: "#ebcb8b",
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
catppuccin: {
|
|
109
|
+
primary: c256(183), // lavender
|
|
110
|
+
secondary: c256(211), // pink
|
|
111
|
+
muted: c256(244), // overlay
|
|
112
|
+
success: c256(120), // green
|
|
113
|
+
danger: c256(210), // red
|
|
114
|
+
warning: c256(223), // peach
|
|
115
|
+
info: c256(152), // teal
|
|
116
|
+
highlight: pc.bold,
|
|
117
|
+
border: "─",
|
|
118
|
+
borderDim: "┄",
|
|
119
|
+
logo: `\x1b[38;5;183m\x1b[1mAcmeCode\x1b[0m \x1b[38;5;244mv1.0\x1b[0m`,
|
|
120
|
+
bgHeader: "#1e1e2e",
|
|
121
|
+
bgInput: "#24273a",
|
|
122
|
+
accentIdle: "#cba6f7",
|
|
123
|
+
accentBusy: "#fab387",
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
monokai: {
|
|
127
|
+
primary: c256(81), // cyan
|
|
128
|
+
secondary: c256(148), // green
|
|
129
|
+
muted: c256(242), // comment
|
|
130
|
+
success: c256(148), // green
|
|
131
|
+
danger: c256(204), // pink/red
|
|
132
|
+
warning: c256(186), // yellow
|
|
133
|
+
info: c256(141), // purple
|
|
134
|
+
highlight: pc.bold,
|
|
135
|
+
border: "─",
|
|
136
|
+
borderDim: "┄",
|
|
137
|
+
logo: `\x1b[38;5;81m\x1b[1mAcmeCode\x1b[0m \x1b[38;5;242mv1.0\x1b[0m`,
|
|
138
|
+
bgHeader: "#1e1e1e",
|
|
139
|
+
bgInput: "#272822",
|
|
140
|
+
accentIdle: "#66d9e8",
|
|
141
|
+
accentBusy: "#e6db74",
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
gruvbox: {
|
|
145
|
+
primary: c256(214), // orange
|
|
146
|
+
secondary: c256(108), // aqua
|
|
147
|
+
muted: c256(243), // gray
|
|
148
|
+
success: c256(142), // green
|
|
149
|
+
danger: c256(167), // red
|
|
150
|
+
warning: c256(214), // orange
|
|
151
|
+
info: c256(108), // aqua
|
|
152
|
+
highlight: pc.bold,
|
|
153
|
+
border: "─",
|
|
154
|
+
borderDim: "┄",
|
|
155
|
+
logo: `\x1b[38;5;214m\x1b[1mAcmeCode\x1b[0m \x1b[38;5;243mv1.0\x1b[0m`,
|
|
156
|
+
bgHeader: "#1d2021",
|
|
157
|
+
bgInput: "#282828",
|
|
158
|
+
accentIdle: "#fabd2f",
|
|
159
|
+
accentBusy: "#fe8019",
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
everforest: {
|
|
163
|
+
primary: c256(108), // green
|
|
164
|
+
secondary: c256(175), // purple
|
|
165
|
+
muted: c256(243), // gray
|
|
166
|
+
success: c256(142), // green
|
|
167
|
+
danger: c256(167), // red
|
|
168
|
+
warning: c256(214), // yellow
|
|
169
|
+
info: c256(109), // blue
|
|
170
|
+
highlight: pc.bold,
|
|
171
|
+
border: "─",
|
|
172
|
+
borderDim: "┄",
|
|
173
|
+
logo: `\x1b[38;5;108m\x1b[1mAcmeCode\x1b[0m \x1b[38;5;243mv1.0\x1b[0m`,
|
|
174
|
+
bgHeader: "#1e2326",
|
|
175
|
+
bgInput: "#272e33",
|
|
176
|
+
accentIdle: "#a7c080",
|
|
177
|
+
accentBusy: "#e69875",
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
rosepine: {
|
|
181
|
+
primary: c256(189), // iris
|
|
182
|
+
secondary: c256(217), // rose
|
|
183
|
+
muted: c256(60), // muted
|
|
184
|
+
success: c256(115), // foam
|
|
185
|
+
danger: c256(210), // love
|
|
186
|
+
warning: c256(222), // gold
|
|
187
|
+
info: c256(116), // pine
|
|
188
|
+
highlight: pc.bold,
|
|
189
|
+
border: "─",
|
|
190
|
+
borderDim: "┄",
|
|
191
|
+
logo: `\x1b[38;5;189m\x1b[1mAcmeCode\x1b[0m \x1b[38;5;60mv1.0\x1b[0m`,
|
|
192
|
+
bgHeader: "#191724",
|
|
193
|
+
bgInput: "#1f1d2e",
|
|
194
|
+
accentIdle: "#c4a7e7",
|
|
195
|
+
accentBusy: "#ebbcba",
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
solarized: {
|
|
199
|
+
primary: c256(37), // cyan
|
|
200
|
+
secondary: c256(61), // violet
|
|
201
|
+
muted: c256(240), // base01
|
|
202
|
+
success: c256(64), // green
|
|
203
|
+
danger: c256(160), // red
|
|
204
|
+
warning: c256(136), // yellow
|
|
205
|
+
info: c256(33), // blue
|
|
206
|
+
highlight: pc.bold,
|
|
207
|
+
border: "─",
|
|
208
|
+
borderDim: "┄",
|
|
209
|
+
logo: `\x1b[38;5;37m\x1b[1mAcmeCode\x1b[0m \x1b[38;5;240mv1.0\x1b[0m`,
|
|
210
|
+
bgHeader: "#002731",
|
|
211
|
+
bgInput: "#00212b",
|
|
212
|
+
accentIdle: "#2aa198",
|
|
213
|
+
accentBusy: "#b58900",
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
// ── Active theme state ──
|
|
218
|
+
let activeThemeName = loadThemeConfig();
|
|
219
|
+
const listeners: ((name: string) => void)[] = [];
|
|
220
|
+
|
|
221
|
+
export function getTheme(): ThemeColors {
|
|
222
|
+
return themes[activeThemeName] || themes["dark"]!;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export function setTheme(name: string): boolean {
|
|
226
|
+
if (themes[name]) {
|
|
227
|
+
activeThemeName = name;
|
|
228
|
+
saveGlobalThemeConfig(name);
|
|
229
|
+
listeners.forEach((l) => l(name));
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export function onThemeChange(listener: (name: string) => void) {
|
|
236
|
+
listeners.push(listener);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export function getThemeName(): string {
|
|
240
|
+
return activeThemeName;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export function listThemes(): string[] {
|
|
244
|
+
return Object.keys(themes);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// ── Re-export active theme (backward compatible) ──
|
|
248
|
+
export const theme = new Proxy({} as ThemeColors, {
|
|
249
|
+
get(_target, prop: string) {
|
|
250
|
+
return (getTheme() as any)[prop];
|
|
251
|
+
},
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
// ── Formatting helpers ──
|
|
255
|
+
export function formatToolIcon(toolName: string): string {
|
|
256
|
+
const icons: Record<string, string> = {
|
|
257
|
+
read_file: "📖",
|
|
258
|
+
write_file: "📝",
|
|
259
|
+
run_command: "⚡",
|
|
260
|
+
list_dir: "📂",
|
|
261
|
+
edit_file: "✏️",
|
|
262
|
+
grep_search: "🔍",
|
|
263
|
+
webfetch: "🌐",
|
|
264
|
+
websearch: "🔎",
|
|
265
|
+
codesearch: "💻",
|
|
266
|
+
lsp: "🧠",
|
|
267
|
+
switch_mode: "⚙️",
|
|
268
|
+
batch: "📦",
|
|
269
|
+
browser_action: "🖥️",
|
|
270
|
+
};
|
|
271
|
+
return icons[toolName] || "🔧";
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export function formatToolName(toolName: string): string {
|
|
275
|
+
const key = `tool.${toolName}` as Parameters<typeof t>[0];
|
|
276
|
+
const translated = t(key);
|
|
277
|
+
return translated !== key ? translated : toolName;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export function formatBorder(width: number, char?: string): string {
|
|
281
|
+
return (char || getTheme().border).repeat(width);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export function formatKeyHint(key: string, label: string): string {
|
|
285
|
+
const t = getTheme();
|
|
286
|
+
return `${t.muted("[")}${t.primary(key)}${t.muted("]")} ${t.muted(label)}`;
|
|
287
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"outDir": "dist",
|
|
11
|
+
"rootDir": "src",
|
|
12
|
+
"declaration": true,
|
|
13
|
+
"composite": true,
|
|
14
|
+
"jsx": "react"
|
|
15
|
+
},
|
|
16
|
+
"references": [
|
|
17
|
+
{
|
|
18
|
+
"path": "../core"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"include": [
|
|
22
|
+
"src/**/*"
|
|
23
|
+
]
|
|
24
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"forceConsistentCasingInFileNames": true,
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"rootDir": "./packages",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"jsx": "react",
|
|
14
|
+
"declaration": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["packages/**/*"],
|
|
17
|
+
"exclude": ["node_modules", "dist"]
|
|
18
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# AcmeCode for VS Code
|
|
2
|
+
|
|
3
|
+
A VS Code extension that integrates AcmeCode AI Coding Assistant directly into your editor.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Quick Launch**: Open AcmeCode terminal with `Ctrl+Escape` (macOS: `Cmd+Escape`)
|
|
8
|
+
- **Sidebar Terminal**: AcmeCode opens in a sidebar terminal for easy access
|
|
9
|
+
- **File Context**: Automatically adds current file path to the conversation
|
|
10
|
+
- **Selection Support**: Include line numbers when you have code selected
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
|
|
14
|
+
| Command | Shortcut | Description |
|
|
15
|
+
| ------------------------------------ | ------------------- | ------------------------------- |
|
|
16
|
+
| `AcmeCode: Open AcmeCode` | `Ctrl+Escape` | Open or focus AcmeCode terminal |
|
|
17
|
+
| `AcmeCode: Open AcmeCode in new tab` | `Ctrl+Shift+Escape` | Open new AcmeCode terminal |
|
|
18
|
+
| `AcmeCode: Add Filepath to AcmeCode` | `Ctrl+Alt+K` | Insert current file path |
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
1. Press `Ctrl+Escape` or click the AcmeCode icon in the editor toolbar
|
|
23
|
+
2. AcmeCode terminal opens in the sidebar
|
|
24
|
+
3. Start chatting with the AI assistant
|
|
25
|
+
4. Use `Ctrl+Alt+K` to quickly reference the current file
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
- AcmeCode CLI must be installed and available in your PATH
|
|
30
|
+
- Install globally with: `npm install -g acmecode`
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
### From VSIX (Local)
|
|
35
|
+
|
|
36
|
+
1. Download or build the `.vsix` file
|
|
37
|
+
2. In VS Code, press `Ctrl+Shift+P`
|
|
38
|
+
3. Type `Extensions: Install from VSIX...`
|
|
39
|
+
4. Select the `.vsix` file
|
|
40
|
+
|
|
41
|
+
## Building
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
cd vscode-acmecode
|
|
45
|
+
npm install
|
|
46
|
+
npm run compile
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
To package as VSIX:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx vsce package
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
MIT
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const esbuild = require("esbuild");
|
|
2
|
+
|
|
3
|
+
const production = process.argv.includes("--production");
|
|
4
|
+
const watch = process.argv.includes("--watch");
|
|
5
|
+
|
|
6
|
+
async function main() {
|
|
7
|
+
const ctx = await esbuild.context({
|
|
8
|
+
entryPoints: ["src/extension.ts"],
|
|
9
|
+
bundle: true,
|
|
10
|
+
format: "cjs",
|
|
11
|
+
minify: production,
|
|
12
|
+
sourcemap: !production,
|
|
13
|
+
sourcesContent: false,
|
|
14
|
+
platform: "node",
|
|
15
|
+
outfile: "dist/extension.js",
|
|
16
|
+
external: ["vscode"],
|
|
17
|
+
logLevel: "info",
|
|
18
|
+
plugins: [
|
|
19
|
+
{
|
|
20
|
+
name: "watch-plugin",
|
|
21
|
+
setup(build) {
|
|
22
|
+
build.onEnd((result) => {
|
|
23
|
+
if (result.errors.length > 0) {
|
|
24
|
+
console.error("Build failed");
|
|
25
|
+
} else {
|
|
26
|
+
console.log("Build succeeded");
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
if (watch) {
|
|
35
|
+
await ctx.watch();
|
|
36
|
+
console.log("Watching for changes...");
|
|
37
|
+
} else {
|
|
38
|
+
await ctx.rebuild();
|
|
39
|
+
await ctx.dispose();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
main().catch((e) => {
|
|
44
|
+
console.error(e);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#0d1117" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<path d="M12 2L2 7l10 5 10-5-10-5z"/>
|
|
3
|
+
<path d="M2 17l10 5 10-5"/>
|
|
4
|
+
<path d="M2 12l10 5 10-5"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<path d="M12 2L2 7l10 5 10-5-10-5z"/>
|
|
3
|
+
<path d="M2 17l10 5 10-5"/>
|
|
4
|
+
<path d="M2 12l10 5 10-5"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
../../../packages/identity/mark-512x512.png
|