orquesta-cli 0.2.33 → 0.2.34
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.
|
@@ -882,6 +882,23 @@ export const PlanExecuteApp = ({ llmClient: initialLlmClient, modelInfo }) => {
|
|
|
882
882
|
};
|
|
883
883
|
const result = await executeSlashCommand(userMessage, commandContext);
|
|
884
884
|
if (result.handled) {
|
|
885
|
+
const cmdWord = userMessage.trim().split(/\s+/)[0];
|
|
886
|
+
if (cmdWord === '/login' || cmdWord === '/sync') {
|
|
887
|
+
try {
|
|
888
|
+
if (configManager.hasEndpoints()) {
|
|
889
|
+
const newClient = createLLMClient();
|
|
890
|
+
setLlmClient(newClient);
|
|
891
|
+
const ep = configManager.getCurrentEndpoint();
|
|
892
|
+
const m = configManager.getCurrentModel();
|
|
893
|
+
if (ep && m)
|
|
894
|
+
setCurrentModelInfo({ model: m.name, endpoint: ep.baseUrl });
|
|
895
|
+
logger.debug('LLMClient rebuilt after auth/config change', { cmd: cmdWord });
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
catch (error) {
|
|
899
|
+
logger.error('Failed to rebuild LLMClient after auth change', error);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
885
902
|
if (result.updatedContext?.messages) {
|
|
886
903
|
const lastMessage = result.updatedContext.messages[result.updatedContext.messages.length - 1];
|
|
887
904
|
if (lastMessage && lastMessage.role === 'assistant') {
|