mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-07 08:02:40 +00:00
* feat: autocomplete v2 * wip chat * wip * feat: chat ai review and apply * feat: multiple providers * update cli gen * fixes * improvements * fix build * fix issues * fix build * final nits * nits * nits
35 lines
762 B
Svelte
35 lines
762 B
Svelte
<script lang="ts">
|
|
import {
|
|
codeCompletionSessionEnabled,
|
|
copilotInfo,
|
|
CODE_COMPLETION_SETTING_NAME
|
|
} from '$lib/stores'
|
|
import { storeLocalSetting } from '$lib/utils'
|
|
import Toggle from '../Toggle.svelte'
|
|
|
|
function storeSetting() {
|
|
storeLocalSetting(CODE_COMPLETION_SETTING_NAME, $codeCompletionSessionEnabled.toString())
|
|
}
|
|
</script>
|
|
|
|
{#if $copilotInfo.enabled && $copilotInfo.codeCompletionModel}
|
|
<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}
|