Fix cursor position after variable on Linux

Closes https://feedback.yaak.app/p/editing-the-url-sometimes-freezes-the-app
This commit is contained in:
Gregory Schier
2025-05-14 20:05:04 -07:00
parent bc4c3178c9
commit cbc40230bb
2 changed files with 35 additions and 3 deletions

View File

@@ -53,9 +53,10 @@ let _activeWorkspaceId: string | null = null;
export async function changeModelStoreWorkspace(workspaceId: string | null) {
console.log('Syncing models with new workspace', workspaceId);
const workspaceModels = await invoke<AnyModel[]>('plugin:yaak-models|workspace_models', {
const workspaceModelsStr = await invoke<string>('plugin:yaak-models|workspace_models', {
workspaceId, // NOTE: if no workspace id provided, it will just fetch global models
});
const workspaceModels = JSON.parse(workspaceModelsStr) as AnyModel[];
const data = newStoreData();
for (const model of workspaceModels) {
data[model.model][model.id] = model;