fix(app): preserve inline file mentions (#38663)
This commit is contained in:
parent
ae4be983cb
commit
b62806683e
8 changed files with 98 additions and 22 deletions
|
|
@ -489,6 +489,9 @@ describe("prompt submit worktree selection", () => {
|
|||
agents: [],
|
||||
})
|
||||
expect((promptInputs[0] as { id?: string }).id).toStartWith("msg_")
|
||||
expect((promptInputs[0] as { legacyParts?: { id: string; type: string; text?: string }[] }).legacyParts).toEqual([
|
||||
{ id: expect.stringMatching(/^prt_/), type: "text", text: "ls" },
|
||||
])
|
||||
})
|
||||
|
||||
test("submits slash commands through the current session API", async () => {
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ export async function sendFollowupDraft(input: FollowupSendInput) {
|
|||
agent: input.draft.agent,
|
||||
model: input.draft.model,
|
||||
variant: input.draft.variant,
|
||||
legacyParts: requestParts,
|
||||
text: requestParts.flatMap((part) => (part.type === "text" ? [part.text] : [])).join("\n"),
|
||||
files: requestParts.flatMap((part) => {
|
||||
if (part.type !== "file") return []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue