the vendoring machinery: one command reproduces the whole state
scripts/vendor.sh clones upstream, rewrites @/ imports to relative paths, and applies scripts/apply-host.py. web/host.ts is ours and gets placed into the vendored tree, because upstream declined it. a script rather than a .patch, and that is not a preference. between cfde698 and 5c83ac6 — one day — upstream changed an import line, re-indented the component from 6 spaces to 8, and added an editAccess guard. a context diff fails on all three, none of which concern us. so every anchor matches structure with flexible whitespace and re-indents to whatever it finds, and a missing anchor stops the run loudly. all three prompt-export paths are wired, which is what upstream said a complete version needs. the other two clipboard writes are ShareMenu's share-link and ask-an-AI blurb, and the reason they are excluded is written down so the count does not read as the same oversight twice. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+5
@@ -6,6 +6,7 @@ import { Doc, Palette, Platform, defaultPlatformOf } from "../lib/tokens";
|
||||
import { Icon } from "./M3Node";
|
||||
import { Field, IconBtn, Segmented } from "./ui";
|
||||
import { t, useLang } from "../lib/i18n";
|
||||
import { useHost } from "../lib/host";
|
||||
|
||||
export function PromptPanel({
|
||||
doc,
|
||||
@@ -22,6 +23,7 @@ export function PromptPanel({
|
||||
const generated = useMemo(() => buildPrompt(doc, widths, undefined, lang), [doc, widths, lang]);
|
||||
const edited = doc.promptEdit !== undefined;
|
||||
const text = edited ? doc.promptEdit! : generated;
|
||||
const host = useHost();
|
||||
const [copied, setCopied] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -32,6 +34,9 @@ export function PromptPanel({
|
||||
|
||||
const copy = async () => {
|
||||
try {
|
||||
let handled = false;
|
||||
try { handled = host.onExport?.(text, null) === true; } catch {}
|
||||
if (handled) { setCopied(true); return; }
|
||||
await navigator.clipboard.writeText(text);
|
||||
setCopied(true);
|
||||
} catch {}
|
||||
|
||||
Reference in New Issue
Block a user