1
0
Fork 0

ContentEditable in chat

This commit is contained in:
Pabloader 2026-03-26 11:06:38 +00:00
parent c4d10113e0
commit b770e5e394
1 changed files with 9 additions and 3 deletions

View File

@ -10,6 +10,7 @@ import Prompt from "../utils/prompt";
import { Tools } from "../utils/tools"; import { Tools } from "../utils/tools";
import { Sparkles } from "lucide-preact"; import { Sparkles } from "lucide-preact";
import clsx from "clsx"; import clsx from "clsx";
import { ContentEditable } from "@common/components/ContentEditable";
// ─── Role Header ────────────────────────────────────────────────────────────── // ─── Role Header ──────────────────────────────────────────────────────────────
@ -350,13 +351,18 @@ export const ChatSidebar = () => {
</button> </button>
</div> </div>
</div> </div>
<textarea <ContentEditable
autoLines
class={styles.input} class={styles.input}
value={input} value={input}
onInput={setInput} onInput={setInput}
onKeyDown={handleKeyDown} onKeyDown={handleKeyDown}
placeholder={isDisabled ? 'Connect to an LLM server to chat' : 'Type a message...'} placeholder={
rows={3} isLoading
? 'Generating...'
: isDisabled
? 'Connect to an LLM server to chat'
: 'Type a message...'}
disabled={isDisabled} disabled={isDisabled}
/> />
{isLoading ? ( {isLoading ? (