ContentEditable in chat
This commit is contained in:
parent
c4d10113e0
commit
b770e5e394
|
|
@ -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 ? (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue