MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / selectModel

Function selectModel

chat/ui/appInterface.js:111–127  ·  view source on GitHub ↗
(modelName)

Source from the content-addressed store, hash-verified

109 get cachedModelDisplayMetadata() {
110 return app.cachedModelDisplayMetadata;
111 },
112 getCurrentSession: () => app.getCurrentSession(),
113 getDefaultModelName: () => app.getDefaultModelName(),
114 normalizeModelName: (modelName) => app.normalizeModelName(modelName),
115 getPrimaryModelName: () => {
116 if (app.chatInput?.getPrimaryModelName) {
117 return app.chatInput.getPrimaryModelName();
118 }
119 const session = app.getCurrentSession();
120 const rawModelName = session?.model || app.state.pendingModelName || null;
121 return rawModelName ? (app.normalizeModelName(rawModelName) || rawModelName) : null;
122 },
123 getCouncilSecondaryModelName: () => app.chatInput?.getSelectedCouncilSecondaryModelName?.() || '',
124 getCouncilSynthesisModelName: () => app.chatInput?.getCouncilSynthesisModelForSelection?.() || '',
125 renderCurrentModel: () => app.renderCurrentModel(),
126 refreshEditModelPickerButton: () => app.chatArea?.updateEditModelPickerButton?.(),
127 actions: {
128 async selectModel(modelName) {
129 const normalizedModelName = app.normalizeModelName(modelName);
130 const session = app.getCurrentSession();

Callers

nothing calls this directly

Calls 5

normalizeModelNameMethod · 0.80
getCurrentSessionMethod · 0.80
saveSettingMethod · 0.80
saveSessionMethod · 0.80
renderCurrentModelMethod · 0.45

Tested by

no test coverage detected