Commit 965b5fb
Address review on sandbox write permission rendering
Translate the write permission's invocationMessage, not just the
confirmation message. AgentSessionApprovalModel reads
invocationMessage for non-terminal approvals, so the sessions list
showed the host's generic "Edit file" while the confirmation card
showed the file. Both now derive from the same value.
Normalize a Windows host path before formatting the link. URI.file
only rewrites separators when the client runs Windows, so a Windows
host paired with a non-Windows client collapsed C:\repo\file.ts into
a single-segment basename and an unresolvable URI.
Revert the chatToolConfirmationSubPart change. It surfaced the raw
input for plain-string confirmations, but that editor is writable
while agent-host approval dispatch never sends editedToolInput, so
edits were silently discarded. Translating the message removes the
need for it, and this no longer touches shared rendering code.
Also stop emitting the raw input for writes: it repeated the file the
message already names.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6359562 commit 965b5fb
3 files changed
Lines changed: 55 additions & 30 deletions
File tree
- src/vs/workbench/contrib/chat
- browser
- agentSessions/agentHost
- widget/chatContentParts/toolInvocationParts
- test/browser/agentSessions
Lines changed: 22 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2334 | 2334 | | |
2335 | 2335 | | |
2336 | 2336 | | |
2337 | | - | |
2338 | | - | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
2339 | 2340 | | |
2340 | | - | |
2341 | | - | |
2342 | | - | |
| 2341 | + | |
2343 | 2342 | | |
2344 | 2343 | | |
2345 | 2344 | | |
| |||
2348 | 2347 | | |
2349 | 2348 | | |
2350 | 2349 | | |
2351 | | - | |
| 2350 | + | |
2352 | 2351 | | |
2353 | 2352 | | |
2354 | 2353 | | |
| |||
2415 | 2414 | | |
2416 | 2415 | | |
2417 | 2416 | | |
2418 | | - | |
2419 | | - | |
2420 | | - | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
2421 | 2423 | | |
2422 | | - | |
2423 | | - | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
2424 | 2430 | | |
2425 | | - | |
| 2431 | + | |
2426 | 2432 | | |
2427 | | - | |
2428 | | - | |
2429 | | - | |
2430 | | - | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
2431 | 2436 | | |
2432 | 2437 | | |
2433 | 2438 | | |
| |||
2448 | 2453 | | |
2449 | 2454 | | |
2450 | 2455 | | |
2451 | | - | |
| 2456 | + | |
2452 | 2457 | | |
2453 | 2458 | | |
2454 | 2459 | | |
| |||
Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
| 160 | + | |
| 161 | + | |
168 | 162 | | |
169 | 163 | | |
170 | 164 | | |
| |||
Lines changed: 31 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1615 | 1615 | | |
1616 | 1616 | | |
1617 | 1617 | | |
1618 | | - | |
1619 | | - | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
1620 | 1621 | | |
1621 | 1622 | | |
1622 | 1623 | | |
| |||
1638 | 1639 | | |
1639 | 1640 | | |
1640 | 1641 | | |
| 1642 | + | |
1641 | 1643 | | |
1642 | 1644 | | |
1643 | 1645 | | |
1644 | 1646 | | |
1645 | 1647 | | |
| 1648 | + | |
1646 | 1649 | | |
1647 | | - | |
| 1650 | + | |
| 1651 | + | |
1648 | 1652 | | |
1649 | 1653 | | |
1650 | 1654 | | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
1651 | 1678 | | |
1652 | 1679 | | |
1653 | 1680 | | |
| |||
1656 | 1683 | | |
1657 | 1684 | | |
1658 | 1685 | | |
1659 | | - | |
| 1686 | + | |
1660 | 1687 | | |
1661 | 1688 | | |
1662 | 1689 | | |
| |||
1678 | 1705 | | |
1679 | 1706 | | |
1680 | 1707 | | |
1681 | | - | |
1682 | 1708 | | |
1683 | 1709 | | |
1684 | 1710 | | |
| |||
0 commit comments