Files
windmill/frontend/src/lib/components/copilot/CodeCompletionStatus.svelte
T
556b4a41a1 feat: Support mistral anthropic for ai (#4692)
* wip: openai proxy and other ai proxy integration

* fixing migration script

* wip: support different ai provider in front, fix proxy openai

* wip: adding frontend ai provider

* updated copilot types

* wip: working on anthropic integration

* done AI proxy front

* adding new type and support for anthropic

* updating gitignore

* adding streaming response

* added streaming prompt

* push lib/gen

* wip: fixing anthropic

* anthropic fully supported

* fix backend missing var error and fully support stream event for anthropic

* remove gen directory

* fixing openapi file

* add support for mistral, and update create workspace components

* remove deref.json

* remove package-json

* openapi

* fix ui enable code

* added utility function for init workspace ai provider

* fix workspace switch bug

* update anthropic property and fixed frontend error

* fix workspace settings

* update error message and fix typo migration file

* chore: update openapi file

* fix dev file

* add .sqlx

* all

* update sqlx

---------

Co-authored-by: dieriba <t.dieriba@gmail.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
2024-11-14 14:24:35 +01:00

35 lines
775 B
Svelte

<script lang="ts">
import {
codeCompletionSessionEnabled,
copilotInfo,
FORMAT_ON_SAVE_SETTING_NAME
} from '$lib/stores'
import { storeLocalSetting } from '$lib/utils'
import Toggle from '../Toggle.svelte'
function storeSetting() {
storeLocalSetting(FORMAT_ON_SAVE_SETTING_NAME, $codeCompletionSessionEnabled.toString())
}
</script>
{#if $copilotInfo.exists_ai_resource && $copilotInfo.code_completion_enabled}
<Toggle
size="xs"
bind:checked={$codeCompletionSessionEnabled}
on:change={() => {
storeSetting()
}}
options={{ right: 'AI code completion' }}
/>
{:else}
<Toggle
disabled
size="xs"
checked={false}
on:change={() => {
storeSetting()
}}
options={{ right: 'AI code completion (disabled in workspace settings)' }}
/>
{/if}