mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-22 21:50:42 -05:00
refac
This commit is contained in:
1 parent
139ca26f93
commit
e58dacf0cb
1 file changed
+19
-1
@@ -122,7 +122,12 @@
|
||||
updateChatParams,
|
||||
updateChatFolderIdById
|
||||
} from '$lib/apis/chats';
|
||||
import { resolveTerminalTarget, setCwd, type FilesystemFile } from '$lib/apis/terminal';
|
||||
import {
|
||||
listTerminalSkills,
|
||||
resolveTerminalTarget,
|
||||
setCwd,
|
||||
type FilesystemFile
|
||||
} from '$lib/apis/terminal';
|
||||
import { generateOpenAIChatCompletion, getErrorMessage } from '$lib/apis/openai';
|
||||
import { processUrl, processWebSearch } from '$lib/apis/retrieval';
|
||||
import {
|
||||
@@ -1302,6 +1307,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Sent skill mentions and the + menu's Skills entry need the terminal's skills before any list opens.
|
||||
$: {
|
||||
const terminalId = $selectedTerminalId;
|
||||
void listTerminalSkills(
|
||||
resolveTerminalTarget(terminalId, $terminalServers ?? [], localStorage.token, {
|
||||
chatId: $chatId || null,
|
||||
modelId: selectedModels[0] ?? null
|
||||
})
|
||||
).then((items) => {
|
||||
if (terminalId === $selectedTerminalId) terminalSkills.set(items);
|
||||
});
|
||||
}
|
||||
|
||||
const applyFolderTerminal = (folder: any) => {
|
||||
const terminalId = folder?.data?.terminal_id;
|
||||
if (!terminalId) return;
|
||||
|
||||
Reference in new issue
Block a user