diff --git a/community/resource_types/state.json b/community/resource_types/state.json new file mode 100644 index 0000000000..a05ef1a47f --- /dev/null +++ b/community/resource_types/state.json @@ -0,0 +1,11 @@ +{ + "workspace_id": "starter", + "name": "state", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": {}, + "required": [], + "type": "object" + }, + "description": "" +} diff --git a/frontend/src/lib/components/EditorBar.svelte b/frontend/src/lib/components/EditorBar.svelte index 93ab76153e..1de6f99099 100644 --- a/frontend/src/lib/components/EditorBar.svelte +++ b/frontend/src/lib/components/EditorBar.svelte @@ -54,9 +54,7 @@ $: editor && addEditorActions() async function loadVariables() { - return (await VariableService.listVariable({ workspace: $workspaceStore ?? '' })).map((x) => { - return { name: x.path, ...x } - }) + return await VariableService.listVariable({ workspace: $workspaceStore ?? '' }) } async function loadContextualVariables() { @@ -147,13 +145,10 @@ sendUserToast(`${name} inserted at cursor`) }} itemName="Variable" - extraField="name" + extraField="path" loadItems={loadVariables} >