feat(cli): Partial threading of AgentLoopContext. (#22978)

This commit is contained in:
joshualitt
2026-03-19 09:02:13 -07:00
committed by GitHub
parent 5acaacad96
commit 39d3b0e28c
68 changed files with 608 additions and 421 deletions
+5 -5
View File
@@ -34,10 +34,10 @@ const setModelCommand: SlashCommand = {
const modelName = parts[0];
const persist = parts.includes('--persist');
if (context.services.config) {
context.services.config.setModel(modelName, !persist);
if (context.services.agentContext?.config) {
context.services.agentContext.config.setModel(modelName, !persist);
const event = new ModelSlashCommandEvent(modelName);
logModelSlashCommand(context.services.config, event);
logModelSlashCommand(context.services.agentContext.config, event);
context.ui.addItem({
type: MessageType.INFO,
@@ -53,8 +53,8 @@ const manageModelCommand: SlashCommand = {
kind: CommandKind.BUILT_IN,
autoExecute: true,
action: async (context: CommandContext) => {
if (context.services.config) {
await context.services.config.refreshUserQuota();
if (context.services.agentContext?.config) {
await context.services.agentContext.config.refreshUserQuota();
}
return {
type: 'dialog',