Browse Source

Claude: Disable prompting till the display is ready for desktop mode

handleTool being null is used to signal the display is not yet initialized
Alessandro Pignotti 4 tháng trước cách đây
mục cha
commit
e1c1cf3569
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      src/lib/AnthropicTab.svelte
  2. 1 1
      src/lib/WebVM.svelte

+ 1 - 1
src/lib/AnthropicTab.svelte

@@ -165,5 +165,5 @@
 		</PanelButton>
 	{/if}
 {: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} bind:value={$currentMessage} id="ai-input"/>
+	<textarea class="bg-neutral-700 p-2 rounded-md placeholder-gray-400 resize-none shrink-0" placeholder={handleTool === null ? "Waiting for system initialization..." : "Prompt..."} rows="1" on:keydown={handleMessage} on:input={handleResize} bind:value={$currentMessage} id="ai-input" disabled={handleTool === null}/>
 {/if}

+ 1 - 1
src/lib/WebVM.svelte

@@ -633,7 +633,7 @@
 <main class="relative w-full h-full">
 	<Nav />
 	<div class="absolute top-10 bottom-0 left-0 right-0">
-		<SideBar on:connect={handleConnect} on:reset={handleReset} handleTool={handleTool} on:sidebarPinChange={handleSidebarPinChange}>
+		<SideBar on:connect={handleConnect} on:reset={handleReset} handleTool={!configObj.needsDisplay || curVT == 7 ? handleTool : null} on:sidebarPinChange={handleSidebarPinChange}>
 			<slot></slot>
 		</SideBar>
 		{#if configObj.needsDisplay}