Skip to content

Commit db757d9

Browse files
laststylebender14forge-code-agent
authored andcommitted
refactor(mcp): consolidate confirmation prompt message
1 parent 7ac6d43 commit db757d9

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

  • crates/forge_main/src

crates/forge_main/src/ui.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,11 +1761,7 @@ impl<A: API + ConsoleWriter + 'static, F: Fn(ForgeConfig) -> A + Send + Sync> UI
17611761

17621762
// Render the server list as header rows so it stays visible above the
17631763
// Accept/Reject options regardless of terminal height.
1764-
let mut rows = Vec::with_capacity(config.mcp_servers.len() + 4);
1765-
rows.push(SelectRow::header(format!(
1766-
"Untrusted MCP config found at {}",
1767-
local_path.display(),
1768-
)));
1764+
let mut rows = Vec::with_capacity(config.mcp_servers.len() + 2);
17691765
rows.push(SelectRow::header("Servers:"));
17701766
for (name, server) in &config.mcp_servers {
17711767
// Show the endpoint (URL for HTTP, command for stdio) so the user
@@ -1782,7 +1778,10 @@ impl<A: API + ConsoleWriter + 'static, F: Fn(ForgeConfig) -> A + Send + Sync> UI
17821778
// A missing selection (Esc / cancel) is treated as a rejection so the
17831779
// user is not silently prompted again on the next run.
17841780
let decision = match self.select_raw_row(
1785-
"Do you want to trust these servers?",
1781+
&format!(
1782+
"Untrusted MCP config at {} - trust these servers?",
1783+
local_path.display()
1784+
),
17861785
None,
17871786
rows,
17881787
header_lines,

0 commit comments

Comments
 (0)