|
|
@@ -28,7 +28,7 @@ import { MessageID, PartID } from "@/session/schema"
|
|
|
import { createStore, produce, unwrap } from "solid-js/store"
|
|
|
import { usePromptHistory, type PromptInfo } from "./history"
|
|
|
import { computePromptTraits } from "./traits"
|
|
|
-import { assign } from "./part"
|
|
|
+import { assign, expandPastedTextPlaceholders } from "./part"
|
|
|
import { usePromptStash } from "./stash"
|
|
|
import { DialogStash } from "../dialog-stash"
|
|
|
import { type AutocompleteRef, Autocomplete } from "./autocomplete"
|
|
|
@@ -1544,6 +1544,9 @@ export function Prompt(props: PromptProps) {
|
|
|
}}
|
|
|
ref={(r: TextareaRenderable) => {
|
|
|
input = r
|
|
|
+ Object.assign(r, {
|
|
|
+ getClipboardText: (text: string) => expandPastedTextPlaceholders(text, store.prompt.parts),
|
|
|
+ })
|
|
|
setInputTarget(r)
|
|
|
if (promptPartTypeId === 0) {
|
|
|
promptPartTypeId = input.extmarks.registerType("prompt-part")
|