Merge branch 'staging' into proxy-confirm

This commit is contained in:
Cohee
2024-07-12 21:05:45 +03:00
12 changed files with 159 additions and 118 deletions

View File

@ -4744,22 +4744,23 @@ function runProxyCallback(_, value) {
return foundName;
}
SlashCommandParser.addCommandObject(SlashCommand.fromProps({
name: 'proxy',
callback: runProxyCallback,
returns: 'current proxy',
namedArgumentList: [],
unnamedArgumentList: [
SlashCommandArgument.fromProps({
description: 'name',
typeList: [ARGUMENT_TYPE.STRING],
isRequired: true,
enumProvider: () => proxies.map(preset => new SlashCommandEnumValue(preset.name, preset.url)),
}),
],
helpString: 'Sets a proxy preset by name.',
}));
export function initOpenai() {
SlashCommandParser.addCommandObject(SlashCommand.fromProps({
name: 'proxy',
callback: runProxyCallback,
returns: 'current proxy',
namedArgumentList: [],
unnamedArgumentList: [
SlashCommandArgument.fromProps({
description: 'name',
typeList: [ARGUMENT_TYPE.STRING],
isRequired: true,
enumProvider: () => proxies.map(preset => new SlashCommandEnumValue(preset.name, preset.url)),
}),
],
helpString: 'Sets a proxy preset by name.',
}));
}
$(document).ready(async function () {
$('#test_api_button').on('click', testApiConnection);