( agentSettings: Record<string, unknown>, )
| 1067 | * mid-conversation token expiry gracefully. |
| 1068 | */ |
| 1069 | export async function assertSubscriptionAuthReady( |
| 1070 | agentSettings: Record<string, unknown>, |
| 1071 | ): Promise<void> { |
| 1072 | const llm = toRecord(agentSettings.llm); |
| 1073 | if (!isSubscriptionLlmConfig(llm)) return; |
| 1074 | |
| 1075 | const status = await LLMSubscriptionService.getOpenAIStatus(); |
| 1076 | if (!status.connected) { |
| 1077 | throw new Error(SUBSCRIPTION_LOGIN_REQUIRED_ERROR); |
| 1078 | } |
| 1079 | } |
| 1080 | |
| 1081 | export async function buildStartConversationRequestWithEncryptedSettings(options: { |
| 1082 | settings: Settings; |
no test coverage detected