chore: v2.8.12 — clone queue and progress, session defaults, chat agents, drops as @ mentions
Whole tree from parallel sessions, plus the version bump: - Clone: a queue with live progress (Add workspace and extra folders), clones run under nice/ionice so the machine stays responsive. - Settings → AI tools → Session defaults: a new session's default permission mode / bypass per account. - Chat lists the background subagents that have not reported back yet. - A file pasted or dropped into a claude pane goes in as an @ mention. - Changes panel: say why amend/undo is refused on a pushed commit. - openapi.yaml regenerated (Artifacts, Host, resumeById).
This commit is contained in:
@@ -67,6 +67,7 @@ import { TOKEN_TONE, promptTokens } from "../../lib/promptTokens";
|
||||
import {
|
||||
ATTACH_MIME,
|
||||
addAttachments,
|
||||
claudeMention,
|
||||
droppedAttachments,
|
||||
droppedSkill,
|
||||
droppedText,
|
||||
@@ -203,21 +204,29 @@ interface PromptEditorProps {
|
||||
export type PromptImage = { path: string; url?: string; name: string };
|
||||
|
||||
/** The prompt as sent: the text, then each file's saved path — which is how
|
||||
* the CLI is handed an image or a file. */
|
||||
export function promptWithImages(text: string, images: PromptImage[]): string {
|
||||
return [text.trim(), ...images.map((i) => i.path)].filter(Boolean).join(" ");
|
||||
* the CLI is handed an image or a file; for `claude`, as `@` mentions. */
|
||||
export function promptWithImages(text: string, images: PromptImage[], claude = false): string {
|
||||
return [text.trim(), ...images.map((i) => (claude ? claudeMention(i.path) : i.path))]
|
||||
.filter(Boolean)
|
||||
.join(" ");
|
||||
}
|
||||
|
||||
const IMAGE_PATH = /^[^@].*\.(png|jpe?g|gif|webp)$/i;
|
||||
|
||||
/** The prompt as pasted into a live pane: the text with every non-image file
|
||||
* in it (as `promptWithImages`), and the images' paths apart — each goes in
|
||||
* a paste of its own, the one shape `claude` turns into `[Image #n]` on every
|
||||
* platform (a Windows path inside a paste of text stayed a plain path). */
|
||||
/** The prompt as pasted into a live pane. `claude`: one paste, every file an
|
||||
* `@` mention, and a trailing space so a mention at the end does not leave
|
||||
* the `@` file suggester open to swallow the Enter after it. Any other tool:
|
||||
* the text with every non-image file in it, and the images' paths apart,
|
||||
* each in a paste of its own (how `codex` attaches a pasted image path). */
|
||||
export function promptForPane(
|
||||
text: string,
|
||||
images: PromptImage[]
|
||||
images: PromptImage[],
|
||||
claude = false
|
||||
): { text: string; files: string[] } {
|
||||
if (claude) {
|
||||
const all = promptWithImages(text, images, true);
|
||||
return { text: images.length ? `${all} ` : all, files: [] };
|
||||
}
|
||||
const isImage = (i: PromptImage) => IMAGE_PATH.test(i.path);
|
||||
return {
|
||||
text: promptWithImages(text, images.filter((i) => !isImage(i))),
|
||||
|
||||
Reference in New Issue
Block a user