(chatState: ChatStateType)
| 139 | } |
| 140 | |
| 141 | export function getCurrentMode(chatState: ChatStateType): string { |
| 142 | if (openAIUsed(chatState.baseURL)) { |
| 143 | if (chatState.useOpenAIAssistants) { |
| 144 | return 'openai-assistants'; |
| 145 | } else { |
| 146 | return 'openai'; |
| 147 | } |
| 148 | } else if (openRouterUsed(chatState.baseURL)) { |
| 149 | return 'openrouter.ai'; |
| 150 | } else { |
| 151 | return 'unknown'; // Default case if none of the conditions match |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | export function selectedBotID(chatState: ChatStateType) { |
| 156 | if (openAIUsed(chatState.baseURL)) { |
nothing calls this directly
no test coverage detected