@chosengeneration/light-code 0.211.0 → 0.212.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/dist/cli.cjs +98 -37
- package/dist/server.cjs +95 -34
- package/package.json +1 -1
package/dist/server.cjs
CHANGED
|
@@ -40376,6 +40376,8 @@ var agentAssignmentSchema = external_exports.object({
|
|
|
40376
40376
|
/** `cli` is the Claude command line; `profile` names one of the user's provider profiles. */
|
|
40377
40377
|
kind: external_exports.enum(["cli", "profile"]),
|
|
40378
40378
|
profileId: external_exports.string().optional(),
|
|
40379
|
+
/** A model from that profile's provider for this role, when not the profile's own (providers/seat.ts). */
|
|
40380
|
+
model: external_exports.string().min(1).max(200).optional(),
|
|
40379
40381
|
/**
|
|
40380
40382
|
* The role's system prompt, stored only when the user has edited it.
|
|
40381
40383
|
*
|
|
@@ -40839,6 +40841,8 @@ var observerAgentConfigSchema = external_exports.object({
|
|
|
40839
40841
|
enabled: external_exports.boolean(),
|
|
40840
40842
|
/** Which provider profile answers. Its auth, certificates and headers are used exactly as for the chat. */
|
|
40841
40843
|
profileId: external_exports.string().min(1),
|
|
40844
|
+
/** A model from that provider, when not the profile's own (providers/seat.ts). */
|
|
40845
|
+
model: external_exports.string().min(1).max(200),
|
|
40842
40846
|
/**
|
|
40843
40847
|
* The user's own instructions, replacing the shipped ones (`observers/prompts.ts`). The reply format and the
|
|
40844
40848
|
* running-notes rule are always appended after them, so an edit cannot break parsing or the handoff.
|
|
@@ -41441,6 +41445,8 @@ var configSchema = external_exports.object({
|
|
|
41441
41445
|
* (gemini-4-argon) never produced its first words within the time limit, so no suggestion ever appeared.
|
|
41442
41446
|
*/
|
|
41443
41447
|
composerCompletionProfileId: external_exports.string().min(1),
|
|
41448
|
+
/** A model from that provider for suggestions, when not the profile's own. */
|
|
41449
|
+
composerCompletionModel: external_exports.string().min(1).max(200),
|
|
41444
41450
|
/**
|
|
41445
41451
|
* The decision model (D3 from vLLM Semantic Router, or any OpenAI-compatible model that returns probabilities): a
|
|
41446
41452
|
* provider profile, and what it decides. Nothing here does anything until `profileId` names a profile - Agent team
|
|
@@ -41450,6 +41456,8 @@ var configSchema = external_exports.object({
|
|
|
41450
41456
|
*/
|
|
41451
41457
|
decisionModel: external_exports.object({
|
|
41452
41458
|
profileId: external_exports.string().min(1).optional(),
|
|
41459
|
+
/** A model from that profile's provider, when not the profile's own (providers/seat.ts). */
|
|
41460
|
+
model: external_exports.string().min(1).max(200).optional(),
|
|
41453
41461
|
/**
|
|
41454
41462
|
* Where on the profile's base URL it is asked: blank = automatic (D3's `/systemone`, then chat completions),
|
|
41455
41463
|
* a path such as `/d3/v1/systemone` (D3's API there, no fallback), or `chat` (chat completions only).
|
|
@@ -41483,6 +41491,8 @@ var configSchema = external_exports.object({
|
|
|
41483
41491
|
*/
|
|
41484
41492
|
reranker: external_exports.object({
|
|
41485
41493
|
profileId: external_exports.string().min(1).optional(),
|
|
41494
|
+
/** A model from that profile's provider, when not the profile's own (providers/seat.ts). */
|
|
41495
|
+
model: external_exports.string().min(1).max(200).optional(),
|
|
41486
41496
|
endpoint: external_exports.string().max(200).optional(),
|
|
41487
41497
|
minScore: external_exports.number().min(0).max(0.95).optional(),
|
|
41488
41498
|
candidates: external_exports.number().int().min(5).max(200).optional(),
|
|
@@ -47069,6 +47079,20 @@ ${answer.result.content}`).join("\n\n"),
|
|
|
47069
47079
|
};
|
|
47070
47080
|
}
|
|
47071
47081
|
|
|
47082
|
+
// ../../packages/core/dist/providers/seat.js
|
|
47083
|
+
function seatProfile(profile, model) {
|
|
47084
|
+
const chosen = model?.trim();
|
|
47085
|
+
if (chosen === void 0 || chosen === "" || chosen === profile.model)
|
|
47086
|
+
return profile;
|
|
47087
|
+
const { modelCapabilities: _own, ...rest } = profile;
|
|
47088
|
+
void _own;
|
|
47089
|
+
return { ...rest, model: chosen };
|
|
47090
|
+
}
|
|
47091
|
+
function seatLabel(profile, model) {
|
|
47092
|
+
const chosen = model?.trim();
|
|
47093
|
+
return chosen === void 0 || chosen === "" || chosen === profile.model ? profile.label : `${profile.label} \xB7 ${chosen}`;
|
|
47094
|
+
}
|
|
47095
|
+
|
|
47072
47096
|
// ../../packages/core/dist/agents/team.js
|
|
47073
47097
|
function defaultAssignment(role, context) {
|
|
47074
47098
|
return role === "expert" && context.cliAvailable ? { kind: "cli" } : void 0;
|
|
@@ -47112,7 +47136,8 @@ function resolveTeam(context) {
|
|
|
47112
47136
|
summary: info.summary,
|
|
47113
47137
|
kind: "profile",
|
|
47114
47138
|
...assignment.profileId !== void 0 ? { profileId: assignment.profileId } : {},
|
|
47115
|
-
|
|
47139
|
+
...assignment.model !== void 0 && assignment.model.trim() !== "" ? { model: assignment.model.trim() } : {},
|
|
47140
|
+
label: profile !== void 0 ? seatLabel(profile, assignment.model) : assignment.profileId ?? "unassigned",
|
|
47116
47141
|
prompt,
|
|
47117
47142
|
usesTools,
|
|
47118
47143
|
canWrite,
|
|
@@ -62879,7 +62904,7 @@ var SHARE_SECTIONS = [
|
|
|
62879
62904
|
id: "workspace",
|
|
62880
62905
|
label: "Workspace behaviour",
|
|
62881
62906
|
description: "Mode, step cap, automatic compaction, retries, folders tools may read, and folders hidden from the @ picker.",
|
|
62882
|
-
keys: ["modeId", "maxIterations", "autoCompact", "autoHandoff", "unlimitedSteps", "composerCompletion", "composerCompletionProfileId", "connection", "filesystem"],
|
|
62907
|
+
keys: ["modeId", "maxIterations", "autoCompact", "autoHandoff", "unlimitedSteps", "composerCompletion", "composerCompletionProfileId", "composerCompletionModel", "connection", "filesystem"],
|
|
62883
62908
|
machineSpecific: true
|
|
62884
62909
|
},
|
|
62885
62910
|
{
|
|
@@ -92650,11 +92675,12 @@ ${error51.stack.split("\n").slice(1, 6).join("\n")}`;
|
|
|
92650
92675
|
const id = settings?.profileId;
|
|
92651
92676
|
if (settings === void 0 || id === void 0)
|
|
92652
92677
|
return void 0;
|
|
92653
|
-
const
|
|
92654
|
-
if (
|
|
92678
|
+
const found2 = (config2.profiles ?? []).find((candidate) => candidate.id === id);
|
|
92679
|
+
if (found2 === void 0 || found2.wireFormat !== "openai")
|
|
92655
92680
|
return void 0;
|
|
92681
|
+
const profile = seatProfile(found2, settings.model);
|
|
92656
92682
|
const endpoint = settings.endpoint?.trim();
|
|
92657
|
-
return { model: { profile, http: httpClient, auth: observerStrategy(config2,
|
|
92683
|
+
return { model: { profile, http: httpClient, auth: observerStrategy(config2, found2), ...endpoint !== void 0 && endpoint !== "" ? { endpoint } : {} }, settings, label: seatLabel(found2, settings.model) };
|
|
92658
92684
|
}
|
|
92659
92685
|
function rerankingFor(use, timeoutMs) {
|
|
92660
92686
|
const found2 = cachedReranker;
|
|
@@ -92714,11 +92740,12 @@ ${error51.stack.split("\n").slice(1, 6).join("\n")}`;
|
|
|
92714
92740
|
const id = config2.decisionModel?.profileId;
|
|
92715
92741
|
if (id === void 0)
|
|
92716
92742
|
return void 0;
|
|
92717
|
-
const
|
|
92718
|
-
if (
|
|
92743
|
+
const found2 = (config2.profiles ?? []).find((candidate) => candidate.id === id);
|
|
92744
|
+
if (found2 === void 0 || found2.wireFormat !== "openai")
|
|
92719
92745
|
return void 0;
|
|
92746
|
+
const profile = seatProfile(found2, config2.decisionModel?.model);
|
|
92720
92747
|
const endpoint = config2.decisionModel?.endpoint;
|
|
92721
|
-
return { model: { profile, http: httpClient, auth: observerStrategy(config2,
|
|
92748
|
+
return { model: { profile, http: httpClient, auth: observerStrategy(config2, found2), ...endpoint !== void 0 && endpoint.trim() !== "" ? { endpoint: endpoint.trim() } : {} }, label: seatLabel(found2, config2.decisionModel?.model) };
|
|
92722
92749
|
}
|
|
92723
92750
|
async function askDecisionModel(purpose, question, outcome, signal, timeoutMs = 1e4) {
|
|
92724
92751
|
const found2 = decisionModelFrom(await loadSettings());
|
|
@@ -92895,9 +92922,10 @@ ${answer.slice(0, 12e3)}` }
|
|
|
92895
92922
|
if (settings?.profileId === void 0) {
|
|
92896
92923
|
return { problem: role === "auditor" ? "Recording only: choose a model for the Auditor to have each step reviewed and judged as well." : "Choose a model for the Anti Hallucinator." };
|
|
92897
92924
|
}
|
|
92898
|
-
const
|
|
92899
|
-
if (
|
|
92925
|
+
const found2 = (config2.profiles ?? []).find((p) => p.id === settings.profileId);
|
|
92926
|
+
if (found2 === void 0)
|
|
92900
92927
|
return { problem: `${name}'s provider profile no longer exists. Choose another.` };
|
|
92928
|
+
const profile = seatProfile(found2, settings.model);
|
|
92901
92929
|
if (profile.wireFormat === "vscode-lm")
|
|
92902
92930
|
return { problem: `${name} runs in its own process and cannot use GitHub Copilot through VS Code. Choose a profile that talks OpenAI, Anthropic or Gemini.` };
|
|
92903
92931
|
const exe = services.fastFs;
|
|
@@ -92997,18 +93025,21 @@ ${answer.slice(0, 12e3)}` }
|
|
|
92997
93025
|
}
|
|
92998
93026
|
});
|
|
92999
93027
|
function turnParticipants(config2) {
|
|
93000
|
-
const model = (id
|
|
93028
|
+
const model = (id, seat) => {
|
|
93029
|
+
const found2 = id === void 0 ? void 0 : (config2.profiles ?? []).find((p) => p.id === id);
|
|
93030
|
+
return found2 === void 0 ? void 0 : seatProfile(found2, seat).model;
|
|
93031
|
+
};
|
|
93001
93032
|
const out = {};
|
|
93002
|
-
const decision = model(config2.decisionModel?.profileId);
|
|
93033
|
+
const decision = model(config2.decisionModel?.profileId, config2.decisionModel?.model);
|
|
93003
93034
|
if (decision !== void 0)
|
|
93004
93035
|
out["decision model"] = decision;
|
|
93005
|
-
const reranker = model(config2.reranker?.profileId);
|
|
93036
|
+
const reranker = model(config2.reranker?.profileId, config2.reranker?.model);
|
|
93006
93037
|
if (reranker !== void 0)
|
|
93007
93038
|
out["reranker"] = reranker;
|
|
93008
|
-
const auditor = config2.observers?.auditor?.enabled === true ? model(config2.observers.auditor.profileId) : void 0;
|
|
93039
|
+
const auditor = config2.observers?.auditor?.enabled === true ? model(config2.observers.auditor.profileId, config2.observers.auditor.model) : void 0;
|
|
93009
93040
|
if (auditor !== void 0)
|
|
93010
93041
|
out["Auditor"] = auditor;
|
|
93011
|
-
const guard = config2.observers?.antiHallucination?.enabled === true ? model(config2.observers.antiHallucination.profileId) : void 0;
|
|
93042
|
+
const guard = config2.observers?.antiHallucination?.enabled === true ? model(config2.observers.antiHallucination.profileId, config2.observers.antiHallucination.model) : void 0;
|
|
93012
93043
|
if (guard !== void 0)
|
|
93013
93044
|
out["Anti Hallucinator"] = guard;
|
|
93014
93045
|
return Object.keys(out).length > 0 ? { participants: out } : {};
|
|
@@ -93045,7 +93076,7 @@ ${answer.slice(0, 12e3)}` }
|
|
|
93045
93076
|
};
|
|
93046
93077
|
observerIndex = await resolveAuditIndex(config2);
|
|
93047
93078
|
const profileOf = (id) => (config2.profiles ?? []).find((p) => p.id === id);
|
|
93048
|
-
const modelKey = JSON.stringify([profileOf(o.auditor?.profileId), profileOf(o.antiHallucination?.profileId), config2.tls ?? null, config2.certDir ?? null, o.auditor?.prompt ?? "", o.antiHallucination?.prompt ?? ""]);
|
|
93079
|
+
const modelKey = JSON.stringify([profileOf(o.auditor?.profileId), profileOf(o.antiHallucination?.profileId), o.auditor?.model ?? "", o.antiHallucination?.model ?? "", config2.tls ?? null, config2.certDir ?? null, o.auditor?.prompt ?? "", o.antiHallucination?.prompt ?? ""]);
|
|
93049
93080
|
const key4 = `${JSON.stringify(settings)}|${modelKey}`;
|
|
93050
93081
|
if (key4 === observerKey)
|
|
93051
93082
|
return;
|
|
@@ -94800,8 +94831,11 @@ ${suggestion}`;
|
|
|
94800
94831
|
async function postCompletionSettings() {
|
|
94801
94832
|
const config2 = await loadSettings();
|
|
94802
94833
|
let chatModel;
|
|
94834
|
+
let chatProfileId;
|
|
94803
94835
|
try {
|
|
94804
|
-
|
|
94836
|
+
const active = resolveActiveProfile(config2);
|
|
94837
|
+
chatModel = active.model;
|
|
94838
|
+
chatProfileId = active.id;
|
|
94805
94839
|
} catch {
|
|
94806
94840
|
chatModel = void 0;
|
|
94807
94841
|
}
|
|
@@ -94809,6 +94843,8 @@ ${suggestion}`;
|
|
|
94809
94843
|
type: "completionSettings",
|
|
94810
94844
|
...config2.composerCompletionProfileId !== void 0 ? { profileId: config2.composerCompletionProfileId } : {},
|
|
94811
94845
|
...chatModel !== void 0 ? { chatModel } : {},
|
|
94846
|
+
...chatProfileId !== void 0 ? { chatProfileId } : {},
|
|
94847
|
+
...config2.composerCompletionModel !== void 0 ? { model: config2.composerCompletionModel } : {},
|
|
94812
94848
|
profiles: (config2.profiles ?? []).map((p) => ({ id: p.id, label: p.label, model: p.model })),
|
|
94813
94849
|
...completionProblem !== void 0 ? { lastProblem: completionProblem } : {},
|
|
94814
94850
|
...completionOk !== void 0 ? { lastOk: completionOk } : {}
|
|
@@ -94832,7 +94868,7 @@ ${suggestion}`;
|
|
|
94832
94868
|
try {
|
|
94833
94869
|
const config2 = await loadSettings();
|
|
94834
94870
|
const chosen = config2.composerCompletionProfileId === void 0 ? void 0 : (config2.profiles ?? []).find((p) => p.id === config2.composerCompletionProfileId);
|
|
94835
|
-
const profile = chosen ?? resolveActiveProfile(config2);
|
|
94871
|
+
const profile = seatProfile(chosen ?? resolveActiveProfile(config2), config2.composerCompletionModel);
|
|
94836
94872
|
asking = profile.model;
|
|
94837
94873
|
const style = profile.thinking?.style ?? (/qwen/i.test(profile.model) ? "qwen" : void 0);
|
|
94838
94874
|
const quick = { ...profile, ...style !== void 0 || profile.thinking !== void 0 || profile.wireFormat === "gemini" ? { thinking: { level: "off", ...style !== void 0 ? { style } : {} } } : {} };
|
|
@@ -94859,7 +94895,7 @@ ${suggestion}`;
|
|
|
94859
94895
|
if (controller.signal.reason === "timeout") {
|
|
94860
94896
|
completionProblem = `${asking} did not start answering within 12 seconds - too slow for suggestions. Choose a small, fast model for them below.`;
|
|
94861
94897
|
} else if (failed2 !== void 0) {
|
|
94862
|
-
completionProblem = `${asking} answered with an error: ${failed2.slice(0,
|
|
94898
|
+
completionProblem = `${asking} answered with an error: ${failed2.slice(0, 600)}${/HTTP 404/.test(failed2) ? ` - this model name is not available to this provider or key; pick one from the list under "Its model".` : ""}`;
|
|
94863
94899
|
} else if (reply.trim().length > 0) {
|
|
94864
94900
|
completionProblem = void 0;
|
|
94865
94901
|
completionOk = { model: asking, ms: Date.now() - started };
|
|
@@ -95022,6 +95058,7 @@ ${redact(shown2, cachedSecretValues)}` }
|
|
|
95022
95058
|
summary: info.summary,
|
|
95023
95059
|
...agent !== void 0 ? { kind: agent.kind } : {},
|
|
95024
95060
|
...agent?.profileId !== void 0 ? { profileId: agent.profileId } : {},
|
|
95061
|
+
...agent?.model !== void 0 ? { model: agent.model } : {},
|
|
95025
95062
|
label: agent?.label ?? "Nobody",
|
|
95026
95063
|
available: agent?.available ?? false,
|
|
95027
95064
|
...agent?.reason !== void 0 ? { reason: agent.reason } : {},
|
|
@@ -95312,14 +95349,14 @@ ${redact(shown2, cachedSecretValues)}` }
|
|
|
95312
95349
|
if (profile === void 0) {
|
|
95313
95350
|
throw new Error(`No profile "${expert.profileId ?? ""}" exists any more.`);
|
|
95314
95351
|
}
|
|
95315
|
-
const
|
|
95352
|
+
const seatProfile2 = expert.thinking === void 0 ? profile : {
|
|
95316
95353
|
...profile,
|
|
95317
95354
|
thinking: {
|
|
95318
95355
|
...profile.thinking ?? { level: expert.thinking },
|
|
95319
95356
|
level: expert.thinking
|
|
95320
95357
|
}
|
|
95321
95358
|
};
|
|
95322
|
-
const provider = createChatProvider(
|
|
95359
|
+
const provider = createChatProvider(seatProfile2, httpClient, authStrategyFor(config2, profile), logger, services.languageModels);
|
|
95323
95360
|
let text2 = "";
|
|
95324
95361
|
for await (const chunk of provider.streamChat([
|
|
95325
95362
|
{ role: "system", content: expert.prompt },
|
|
@@ -100401,7 +100438,7 @@ ${answer.slice(0, 16e3)}` } }, (d) => d.best !== void 0 && d.best.probability >=
|
|
|
100401
100438
|
}
|
|
100402
100439
|
async function consultAgentNow(resolved, request2, readOnly) {
|
|
100403
100440
|
const started = Date.now();
|
|
100404
|
-
const model = resolved.kind === "cli" ? "Claude CLI" : ((await loadSettings()).profiles ?? []).find((p) => p.id === resolved.profileId)?.model ?? resolved.label;
|
|
100441
|
+
const model = resolved.kind === "cli" ? "Claude CLI" : resolved.model ?? ((await loadSettings()).profiles ?? []).find((p) => p.id === resolved.profileId)?.model ?? resolved.label;
|
|
100405
100442
|
const record2 = (ok) => observerHub.event({ kind: "consultation", at: Date.now(), role: resolved.role, name: resolved.name, model, ms: Date.now() - started, ok, ...readOnly ? { readOnly: true } : {} });
|
|
100406
100443
|
try {
|
|
100407
100444
|
const answer = await consultAgentInner(resolved, request2, readOnly);
|
|
@@ -100474,15 +100511,16 @@ ${answer.slice(0, 16e3)}` } }, (d) => d.best !== void 0 && d.best.probability >=
|
|
|
100474
100511
|
return { advice: answer.text, label: agent.label };
|
|
100475
100512
|
}
|
|
100476
100513
|
const { config: config2 } = await configManager.load();
|
|
100477
|
-
const
|
|
100478
|
-
if (
|
|
100514
|
+
const found2 = config2.profiles?.find((candidate) => candidate.id === agent.profileId);
|
|
100515
|
+
if (found2 === void 0) {
|
|
100479
100516
|
throw new Error(`No profile "${agent.profileId ?? ""}" exists any more.`);
|
|
100480
100517
|
}
|
|
100481
|
-
const
|
|
100518
|
+
const profile = seatProfile(found2, agent.model);
|
|
100519
|
+
const seatProfile2 = agent.thinking === void 0 ? profile : {
|
|
100482
100520
|
...profile,
|
|
100483
100521
|
thinking: { ...profile.thinking ?? { level: agent.thinking }, level: agent.thinking }
|
|
100484
100522
|
};
|
|
100485
|
-
const provider = createChatProvider(
|
|
100523
|
+
const provider = createChatProvider(seatProfile2, httpClient, authStrategyFor(config2, profile), logger, services.languageModels);
|
|
100486
100524
|
const extraTools = new Set(agent.role === "librarian" && !readOnly ? ["write_skill"] : []);
|
|
100487
100525
|
if (agent.canWrite) {
|
|
100488
100526
|
extraTools.add("write_to_file");
|
|
@@ -100509,8 +100547,8 @@ ${answer.slice(0, 16e3)}` } }, (d) => d.best !== void 0 && d.best.probability >=
|
|
|
100509
100547
|
return decision === "approve";
|
|
100510
100548
|
};
|
|
100511
100549
|
const exe = services.fastFs;
|
|
100512
|
-
const gemini = isGeminiModel(
|
|
100513
|
-
if (exe !== void 0 &&
|
|
100550
|
+
const gemini = isGeminiModel(seatProfile2.model, seatProfile2.baseUrl);
|
|
100551
|
+
if (exe !== void 0 && seatProfile2.wireFormat !== "vscode-lm" && !gemini && (await fastFsAnswered)?.has("agent") === true) {
|
|
100514
100552
|
const system = buildAgentPrompt({
|
|
100515
100553
|
prompt: agent.prompt,
|
|
100516
100554
|
question: "",
|
|
@@ -100519,7 +100557,7 @@ ${answer.slice(0, 16e3)}` } }, (d) => d.best !== void 0 && d.best.probability >=
|
|
|
100519
100557
|
briefing: buildAgentBriefing({ tools: agentBriefingTools?.() ?? [], skills, team: cachedTeam, self: agent.role })
|
|
100520
100558
|
});
|
|
100521
100559
|
const question = prompt.startsWith(system) ? prompt.slice(system.length).trimStart() : prompt;
|
|
100522
|
-
const process5 = await roleProcessFor(agent,
|
|
100560
|
+
const process5 = await roleProcessFor(agent, seatProfile2, config2, exe, system, context === void 0 ? [] : allowedTools);
|
|
100523
100561
|
const byName = new Map(allowedTools.map((tool) => [tool.name, tool]));
|
|
100524
100562
|
const answer = await process5.consult({
|
|
100525
100563
|
prompt: question,
|
|
@@ -101117,7 +101155,20 @@ ${answer.slice(0, 16e3)}` } }, (d) => d.best !== void 0 && d.best.probability >=
|
|
|
101117
101155
|
reportFailure("postCompletionSettings", postCompletionSettings());
|
|
101118
101156
|
} else if (message6.type === "setCompletionProfile") {
|
|
101119
101157
|
const profileId = message6.profileId;
|
|
101120
|
-
|
|
101158
|
+
const model = message6.model;
|
|
101159
|
+
reportFailure("setCompletionProfile", configManager.save("user", { composerCompletionProfileId: profileId, composerCompletionModel: model }).then(() => postCompletionSettings()));
|
|
101160
|
+
} else if (message6.type === "requestProfileModels") {
|
|
101161
|
+
const profileId = message6.profileId;
|
|
101162
|
+
reportFailure("requestProfileModels", (async () => {
|
|
101163
|
+
const config2 = await loadSettings();
|
|
101164
|
+
const profile = (config2.profiles ?? []).find((candidate) => candidate.id === profileId);
|
|
101165
|
+
if (profile === void 0) {
|
|
101166
|
+
post({ type: "profileModels", profileId, models: [], warning: "That profile no longer exists." });
|
|
101167
|
+
return;
|
|
101168
|
+
}
|
|
101169
|
+
const result = await listModelsFor(config2, profile).catch((error51) => ({ ids: [], warning: error51 instanceof Error ? error51.message : String(error51) }));
|
|
101170
|
+
post({ type: "profileModels", profileId, models: result.ids, model: profile.model, ...result.warning !== void 0 ? { warning: result.warning } : {} });
|
|
101171
|
+
})());
|
|
101121
101172
|
} else if (message6.type === "requestCodebaseMemory") {
|
|
101122
101173
|
reportFailure("postMemory", postMemory());
|
|
101123
101174
|
} else if (message6.type === "addCodebaseMemory" || message6.type === "editCodebaseMemory" || message6.type === "deleteCodebaseMemory") {
|
|
@@ -101656,6 +101707,7 @@ ${answer.slice(0, 16e3)}` } }, (d) => d.best !== void 0 && d.best.probability >=
|
|
|
101656
101707
|
roles[role] = {
|
|
101657
101708
|
kind: assignment.kind,
|
|
101658
101709
|
...assignment.profileId !== void 0 ? { profileId: assignment.profileId } : {},
|
|
101710
|
+
...assignment.kind === "profile" && assignment.model !== void 0 && assignment.model.trim() !== "" ? { model: assignment.model.trim() } : {},
|
|
101659
101711
|
...roles[role]?.prompt !== void 0 ? { prompt: roles[role].prompt } : {}
|
|
101660
101712
|
};
|
|
101661
101713
|
}
|
|
@@ -103796,6 +103848,13 @@ Folders you always want readable go in config:filesystem.readRoots.
|
|
|
103796
103848
|
"qwen"
|
|
103797
103849
|
],
|
|
103798
103850
|
body: `
|
|
103851
|
+
**Seats take a provider and a model.** Every seat - each specialist role in Agents, the decision model, the
|
|
103852
|
+
reranker, the Auditor, the Anti Hallucinator, suggestions while typing - chooses a provider profile and then **Its
|
|
103853
|
+
model** from that provider's own list (loaded by itself; a name can be typed too). Empty is the profile's own model. So
|
|
103854
|
+
one provider profile serves every seat that uses it - no need for a profile per model. In Settings \u2192 Providers the
|
|
103855
|
+
model list loads by itself as soon as the address and key are filled in (or when a saved profile is opened); Refresh is
|
|
103856
|
+
only for a list that changed.
|
|
103857
|
+
|
|
103799
103858
|
**Settings \u2192 Providers.** Several named profiles, switchable from the composer. Three wire
|
|
103800
103859
|
formats: OpenAI-compatible, Anthropic Messages, and Gemini - plus **GitHub Copilot from VS Code**
|
|
103801
103860
|
(see the GitHub Copilot topic). Presets prefill a base URL and wire
|
|
@@ -107820,7 +107879,7 @@ Kept on this computer, outside the repository, one per codebase and shared by it
|
|
|
107820
107879
|
],
|
|
107821
107880
|
body: `
|
|
107822
107881
|
**The chat's model can suggest the rest of what you are typing**, in grey after the cursor. Off unless you turn
|
|
107823
|
-
it on: Settings \u2192
|
|
107882
|
+
it on: Settings \u2192 Project \u2192 **Suggestions while typing** (config:composerCompletion).
|
|
107824
107883
|
|
|
107825
107884
|
- **Tab** takes the next word, so you can take part of a suggestion and go on typing.
|
|
107826
107885
|
- **Ctrl+Space**, or **Right arrow** with the cursor at the end, takes all of it.
|
|
@@ -107837,9 +107896,11 @@ for Qwen, \`thinkingBudget: 0\` for Gemini) - it used to spend the whole time li
|
|
|
107837
107896
|
suggestion has 12 seconds.
|
|
107838
107897
|
|
|
107839
107898
|
**No suggestion appears?** The panel says why under **Last suggestion** - most often that the model did not start
|
|
107840
|
-
answering within 12 seconds. A large model is usually too slow for this: choose
|
|
107841
|
-
suggestions** (config:composerCompletionProfileId)
|
|
107842
|
-
|
|
107899
|
+
answering within 12 seconds. A large model is usually too slow for this: choose the provider under **Model for
|
|
107900
|
+
suggestions** (config:composerCompletionProfileId) and a small, fast model from it under **Its model**
|
|
107901
|
+
(config:composerCompletionModel) - a Flash or mini model - and the chat keeps its own model. A 404 means the model
|
|
107902
|
+
name is not available to that provider or key: pick one from the list. Why a suggestion did not come is also written
|
|
107903
|
+
to the log.
|
|
107843
107904
|
`
|
|
107844
107905
|
},
|
|
107845
107906
|
{
|