Claude: Avoid using the current message on sidebar closing
This commit is contained in:
parent
29fe270168
commit
b5443fa60f
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { apiState, setApiKey, addMessage, messageList } from '$lib/anthropic.js'
|
||||
import { apiState, setApiKey, addMessage, messageList, currentMessage } from '$lib/anthropic.js'
|
||||
import PanelButton from './PanelButton.svelte';
|
||||
export let handleTool;
|
||||
function handleKeyEnter(e)
|
||||
@ -73,5 +73,5 @@
|
||||
{#if $apiState == "KEY_REQUIRED"}
|
||||
<textarea class="bg-neutral-700 p-2 rounded-md placeholder-gray-400 resize-none shrink-0" placeholder="Insert your Claude API Key" rows="1" on:keydown={handleKeyEnter} on:input={handleResize}/>
|
||||
{:else}
|
||||
<textarea class="bg-neutral-700 p-2 rounded-md placeholder-gray-400 resize-none shrink-0" placeholder="Prompt..." rows="1" on:keydown={handleMessage} on:input={handleResize}/>
|
||||
<textarea class="bg-neutral-700 p-2 rounded-md placeholder-gray-400 resize-none shrink-0" placeholder="Prompt..." rows="1" on:keydown={handleMessage} on:input={handleResize} bind:value={$currentMessage}/>
|
||||
{/if}
|
||||
|
@ -94,6 +94,7 @@ function initialize()
|
||||
|
||||
export const apiState = writable("KEY_REQUIRED");
|
||||
export const messageList = writable(messages);
|
||||
export const currentMessage = writable("");
|
||||
|
||||
if(browser)
|
||||
initialize();
|
||||
|
Loading…
x
Reference in New Issue
Block a user