Chat Completion: Streamline settings and API key handling (#4687)

* refactor: streamline CC settings and API key handling

* Add types for API settings

* Allow keyless custom source connection
This commit is contained in:
Cohee
2025-10-23 21:28:37 +03:00
committed by GitHub
parent 4e428c938d
commit 55969bc96e
2 changed files with 45 additions and 365 deletions
+4
View File
@@ -2,12 +2,16 @@ import libs from './lib';
import getContext from './scripts/st-context';
import { power_user } from './scripts/power-user';
import { QuickReplyApi } from './scripts/extensions/quick-reply/api/QuickReplyApi';
import { oai_settings } from './scripts/openai';
import { textgenerationwebui_settings } from './scripts/textgen-settings';
declare global {
// Custom types
type InstructSettings = typeof power_user.instruct;
type ContextSettings = typeof power_user.context;
type ReasoningSettings = typeof power_user.reasoning;
type ChatCompletionSettings = typeof oai_settings;
type TextCompletionSettings = typeof textgenerationwebui_settings;
// Global namespace modules
interface Window {