mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-09 03:17:58 +00:00
fix: restore working settings link in command permissions tooltip (#6253)
- Replace broken command URI with onClick handler that posts message
- Command URIs don't work in webview context, must use postMessage
- Restores original working implementation from PR #5798
- Directs to autoApprove section where command permissions are configured
The bug was introduced in commit 77bc9e6f when the tooltip was updated
to use command URI instead of the working onClick pattern.
This commit is contained in:
parent
478869e37a
commit
4d0550c855
1 changed files with 9 additions and 1 deletions
|
|
@ -31,6 +31,10 @@ export const CommandPatternSelector: React.FC<CommandPatternSelectorProps> = ({
|
|||
const [isExpanded, setIsExpanded] = useState(false)
|
||||
const [editingStates, setEditingStates] = useState<Record<string, { isEditing: boolean; value: string }>>({})
|
||||
|
||||
const handleOpenSettings = () => {
|
||||
window.postMessage({ type: "action", action: "settingsButtonClicked", values: { section: "autoApprove" } })
|
||||
}
|
||||
|
||||
// Create a combined list with full command first, then patterns
|
||||
const allPatterns = useMemo(() => {
|
||||
// Trim the command to ensure consistency with extracted patterns
|
||||
|
|
@ -90,7 +94,11 @@ export const CommandPatternSelector: React.FC<CommandPatternSelectorProps> = ({
|
|||
components={{
|
||||
settingsLink: (
|
||||
<VSCodeLink
|
||||
href="command:workbench.action.openSettings?%5B%22roo-code%22%5D"
|
||||
href="#"
|
||||
onClick={(e) => {
|
||||
e.preventDefault()
|
||||
handleOpenSettings()
|
||||
}}
|
||||
className="text-vscode-textLink-foreground hover:text-vscode-textLink-activeForeground"
|
||||
/>
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue