mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-03 04:37:40 +01:00
Merge branch 'staging' into sysprompt-divorce
This commit is contained in:
commit
d0657161a1
@ -8569,20 +8569,27 @@ async function connectAPISlash(args, text) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$(`#main_api option[value='${apiConfig.selected || text}']`).prop('selected', true);
|
||||
$('#main_api').trigger('change');
|
||||
let connectionRequired = false;
|
||||
|
||||
if (apiConfig.source) {
|
||||
if (main_api !== apiConfig.selected) {
|
||||
$(`#main_api option[value='${apiConfig.selected || text}']`).prop('selected', true);
|
||||
$('#main_api').trigger('change');
|
||||
connectionRequired = true;
|
||||
}
|
||||
|
||||
if (apiConfig.source && oai_settings.chat_completion_source !== apiConfig.source) {
|
||||
$(`#chat_completion_source option[value='${apiConfig.source}']`).prop('selected', true);
|
||||
$('#chat_completion_source').trigger('change');
|
||||
connectionRequired = true;
|
||||
}
|
||||
|
||||
if (apiConfig.type) {
|
||||
if (apiConfig.type && textgen_settings.type !== apiConfig.type) {
|
||||
$(`#textgen_type option[value='${apiConfig.type}']`).prop('selected', true);
|
||||
$('#textgen_type').trigger('change');
|
||||
connectionRequired = true;
|
||||
}
|
||||
|
||||
if (apiConfig.button) {
|
||||
if (connectionRequired && apiConfig.button) {
|
||||
$(apiConfig.button).trigger('click');
|
||||
}
|
||||
|
||||
|
@ -19,20 +19,21 @@ const DEFAULT_SETTINGS = {
|
||||
selectedProfile: null,
|
||||
};
|
||||
|
||||
const COMMON_COMMANDS = [
|
||||
const CC_COMMANDS = [
|
||||
'api',
|
||||
'preset',
|
||||
// Do not fix; CC needs to set the API twice because it could be overridden by the preset
|
||||
'api',
|
||||
'api-url',
|
||||
'model',
|
||||
];
|
||||
|
||||
const CC_COMMANDS = [
|
||||
...COMMON_COMMANDS,
|
||||
'proxy',
|
||||
];
|
||||
|
||||
const TC_COMMANDS = [
|
||||
...COMMON_COMMANDS,
|
||||
'api',
|
||||
'preset',
|
||||
'api-url',
|
||||
'model',
|
||||
'sysprompt',
|
||||
'sysprompt-state',
|
||||
'instruct',
|
||||
|
Loading…
x
Reference in New Issue
Block a user