Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Forward original tool params on MCP App form submit
The issue-write and pr-write forms rebuilt their submit payload from
scratch, so any parameter the form does not render was dropped on submit.
Spread the original toolInput first and override only the edited fields,
so unsupported params (e.g. issue_fields, labels, state) are preserved
when the user submits the form.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Loading branch information
mattdholloway and Copilot committed Jun 1, 2026
commit 95b05a86c3e4a51ebce9841b7e6b0479a81f853b
3 changes: 2 additions & 1 deletion ui/src/apps/issue-write/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ function CreateIssueApp() {

try {
const params: Record<string, unknown> = {
...(toolInput as Record<string, unknown> | undefined),
method: isUpdateMode ? "update" : "create",
owner,
repo,
Expand Down Expand Up @@ -204,7 +205,7 @@ function CreateIssueApp() {
} finally {
setIsSubmitting(false);
}
}, [title, body, owner, repo, isUpdateMode, issueNumber, callTool, setModelContext]);
}, [title, body, owner, repo, isUpdateMode, issueNumber, toolInput, callTool, setModelContext]);

const body_node = (() => {
if (appError) {
Expand Down
3 changes: 2 additions & 1 deletion ui/src/apps/pr-write/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ function CreatePRApp() {

try {
const result = await callTool("create_pull_request", {
...(toolInput as Record<string, unknown> | undefined),
owner, repo,
title: title.trim(),
body: body.trim(),
Expand Down Expand Up @@ -193,7 +194,7 @@ function CreatePRApp() {
} finally {
setIsSubmitting(false);
}
}, [title, body, owner, repo, head, base, isDraft, maintainerCanModify, callTool, setModelContext]);
}, [title, body, owner, repo, head, base, isDraft, maintainerCanModify, toolInput, callTool, setModelContext]);

if (successPR) {
return (
Expand Down
Loading