codeep 1.2.46 → 1.2.47
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/acp/server.js +27 -10
- package/package.json +1 -1
package/dist/acp/server.js
CHANGED
|
@@ -4,7 +4,8 @@ import { randomUUID } from 'crypto';
|
|
|
4
4
|
import { StdioTransport } from './transport.js';
|
|
5
5
|
import { runAgentSession } from './session.js';
|
|
6
6
|
import { initWorkspace, loadWorkspace, handleCommand } from './commands.js';
|
|
7
|
-
import { autoSaveSession, config,
|
|
7
|
+
import { autoSaveSession, config, setProvider } from '../config/index.js';
|
|
8
|
+
import { PROVIDERS } from '../config/providers.js';
|
|
8
9
|
import { getCurrentVersion } from '../utils/update.js';
|
|
9
10
|
// ─── Slash commands advertised to Zed ────────────────────────────────────────
|
|
10
11
|
const AVAILABLE_COMMANDS = [
|
|
@@ -59,15 +60,21 @@ const AGENT_MODES = {
|
|
|
59
60
|
};
|
|
60
61
|
// ─── Config options ───────────────────────────────────────────────────────────
|
|
61
62
|
function buildConfigOptions() {
|
|
62
|
-
const models = getModelsForCurrentProvider();
|
|
63
63
|
const currentModel = config.get('model') ?? '';
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
// Flatten all providers × models into one list so Zed shows a single dropdown
|
|
65
|
+
const modelOptions = [];
|
|
66
|
+
for (const [providerId, provider] of Object.entries(PROVIDERS)) {
|
|
67
|
+
for (const model of provider.models) {
|
|
68
|
+
modelOptions.push({
|
|
69
|
+
value: `${providerId}/${model.id}`,
|
|
70
|
+
name: `${model.name} - ${model.description} (${provider.name})`,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const currentProviderId = config.get('provider') ?? '';
|
|
75
|
+
const compositeValue = `${currentProviderId}/${currentModel}`;
|
|
76
|
+
const currentValue = modelOptions.some(o => o.value === compositeValue)
|
|
77
|
+
? compositeValue
|
|
71
78
|
: (modelOptions[0]?.value ?? '');
|
|
72
79
|
return [
|
|
73
80
|
{
|
|
@@ -252,7 +259,17 @@ export function startAcpServer() {
|
|
|
252
259
|
return;
|
|
253
260
|
}
|
|
254
261
|
if (configId === 'model' && typeof value === 'string') {
|
|
255
|
-
|
|
262
|
+
// value is "providerId/modelId" — split and switch both
|
|
263
|
+
const slashIdx = value.indexOf('/');
|
|
264
|
+
if (slashIdx !== -1) {
|
|
265
|
+
const providerId = value.slice(0, slashIdx);
|
|
266
|
+
const modelId = value.slice(slashIdx + 1);
|
|
267
|
+
setProvider(providerId); // sets provider + defaultModel + protocol
|
|
268
|
+
config.set('model', modelId);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
config.set('model', value);
|
|
272
|
+
}
|
|
256
273
|
}
|
|
257
274
|
transport.respond(msg.id, {});
|
|
258
275
|
// Confirm the new value back to Zed so its UI state stays in sync
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.47",
|
|
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",
|