mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-22 00:13:09 +08:00
Merge remote-tracking branch 'origin/feat/agents-new' into feat/agents-new
This commit is contained in:
commit
1ec81f9e75
@ -5,15 +5,22 @@ import React from 'react'
|
||||
|
||||
export interface ModelLabelProps extends Omit<React.ComponentPropsWithRef<'div'>, 'children'> {
|
||||
model?: ApiModel
|
||||
classNames?: {
|
||||
container?: string
|
||||
avatar?: string
|
||||
modelName?: string
|
||||
divider?: string
|
||||
providerName?: string
|
||||
}
|
||||
}
|
||||
|
||||
export const ApiModelLabel: React.FC<ModelLabelProps> = ({ model, className, ...props }) => {
|
||||
export const ApiModelLabel: React.FC<ModelLabelProps> = ({ model, className, classNames, ...props }) => {
|
||||
return (
|
||||
<div className={cn('flex items-center gap-1', className)} {...props}>
|
||||
<Avatar src={model ? getModelLogo(model.id) : undefined} className="h-4 w-4" />
|
||||
<span>
|
||||
{model?.name} | {model?.provider_name}
|
||||
</span>
|
||||
<div className={cn('flex items-center gap-1', className, classNames?.container)} {...props}>
|
||||
<Avatar src={model ? getModelLogo(model.id) : undefined} className={cn('h-4 w-4', classNames?.avatar)} />
|
||||
<span className={classNames?.modelName}>{model?.name}</span>
|
||||
<span className={classNames?.divider}> | </span>
|
||||
<span className={classNames?.providerName}>{model?.provider_name}</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import {
|
||||
Button,
|
||||
Chip,
|
||||
cn,
|
||||
Form,
|
||||
Input,
|
||||
@ -18,6 +17,7 @@ import {
|
||||
} from '@heroui/react'
|
||||
import { loggerService } from '@logger'
|
||||
import type { Selection } from '@react-types/shared'
|
||||
import { AllowedToolsSelect } from '@renderer/components/agent'
|
||||
import { getModelLogo } from '@renderer/config/models'
|
||||
import { useAgent } from '@renderer/hooks/agents/useAgent'
|
||||
import { useApiModels } from '@renderer/hooks/agents/useModels'
|
||||
@ -198,21 +198,6 @@ export const SessionModal: React.FC<Props> = ({
|
||||
[availableTools]
|
||||
)
|
||||
|
||||
const renderSelectedTools = useCallback((items: SelectedItems<Tool>) => {
|
||||
if (!items.length) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{items.map((item) => (
|
||||
<Chip key={item.key} size="sm" variant="flat" className="max-w-[160px] truncate">
|
||||
{item.data?.name ?? item.textValue ?? item.key}
|
||||
</Chip>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}, [])
|
||||
|
||||
const modelOptions = useMemo(() => {
|
||||
// mocked data. not final version
|
||||
return (models ?? []).map((model) => ({
|
||||
@ -363,32 +348,11 @@ export const SessionModal: React.FC<Props> = ({
|
||||
value={form.description ?? ''}
|
||||
onValueChange={onDescChange}
|
||||
/>
|
||||
<Select
|
||||
selectionMode="multiple"
|
||||
isMultiline
|
||||
<AllowedToolsSelect
|
||||
items={availableTools}
|
||||
selectedKeys={selectedToolKeys}
|
||||
onSelectionChange={onAllowedToolsChange}
|
||||
label={t('agent.session.allowed_tools.label')}
|
||||
placeholder={t('agent.session.allowed_tools.placeholder')}
|
||||
description={
|
||||
availableTools.length
|
||||
? t('agent.session.allowed_tools.helper')
|
||||
: t('agent.session.allowed_tools.empty')
|
||||
}
|
||||
isDisabled={!availableTools.length}
|
||||
items={availableTools}
|
||||
renderValue={renderSelectedTools}>
|
||||
{(tool) => (
|
||||
<SelectItem key={tool.id} textValue={tool.name}>
|
||||
<div className="flex flex-col">
|
||||
<span className="font-medium text-sm">{tool.name}</span>
|
||||
{tool.description ? (
|
||||
<span className="text-foreground-500 text-xs">{tool.description}</span>
|
||||
) : null}
|
||||
</div>
|
||||
</SelectItem>
|
||||
)}
|
||||
</Select>
|
||||
/>
|
||||
<Textarea label={t('common.prompt')} value={form.instructions ?? ''} onValueChange={onInstChange} />
|
||||
</ModalBody>
|
||||
<ModalFooter className="w-full">
|
||||
|
||||
54
src/renderer/src/components/agent/AllowedToolsSelect.tsx
Normal file
54
src/renderer/src/components/agent/AllowedToolsSelect.tsx
Normal file
@ -0,0 +1,54 @@
|
||||
import { Chip, cn, Select, SelectedItems, SelectItem, SelectProps } from '@heroui/react'
|
||||
import { Tool } from '@renderer/types'
|
||||
import React, { useCallback } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export interface AllowedToolsSelectProps extends Omit<SelectProps, 'children'> {
|
||||
items: Tool[]
|
||||
}
|
||||
|
||||
export const AllowedToolsSelect: React.FC<AllowedToolsSelectProps> = (props) => {
|
||||
const { t } = useTranslation()
|
||||
const { items: availableTools, className, ...rest } = props
|
||||
|
||||
const renderSelectedTools = useCallback((items: SelectedItems<Tool>) => {
|
||||
if (!items.length) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{items.map((item) => (
|
||||
<Chip key={item.key} size="sm" variant="flat" className="max-w-[160px] truncate">
|
||||
{item.data?.name ?? item.textValue ?? item.key}
|
||||
</Chip>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<Select
|
||||
aria-label={t('agent.session.allowed_tools.label')}
|
||||
selectionMode="multiple"
|
||||
isMultiline
|
||||
label={t('agent.session.allowed_tools.label')}
|
||||
placeholder={t('agent.session.allowed_tools.placeholder')}
|
||||
description={
|
||||
availableTools.length ? t('agent.session.allowed_tools.helper') : t('agent.session.allowed_tools.empty')
|
||||
}
|
||||
isDisabled={!availableTools.length}
|
||||
items={availableTools}
|
||||
renderValue={renderSelectedTools}
|
||||
className={cn('max-w-xl', className)}
|
||||
{...rest}>
|
||||
{(tool) => (
|
||||
<SelectItem key={tool.id} textValue={tool.name}>
|
||||
<div className="flex flex-col">
|
||||
<span className="font-medium text-sm">{tool.name}</span>
|
||||
{tool.description ? <span className="text-foreground-500 text-xs">{tool.description}</span> : null}
|
||||
</div>
|
||||
</SelectItem>
|
||||
)}
|
||||
</Select>
|
||||
)
|
||||
}
|
||||
1
src/renderer/src/components/agent/index.tsx
Normal file
1
src/renderer/src/components/agent/index.tsx
Normal file
@ -0,0 +1 @@
|
||||
export { AllowedToolsSelect } from './AllowedToolsSelect'
|
||||
@ -1,10 +1,13 @@
|
||||
import { ApiModelsFilter } from '@renderer/types'
|
||||
|
||||
import { useApiModels } from './useModels'
|
||||
|
||||
export type UseModelProps = {
|
||||
id: string
|
||||
id?: string
|
||||
filter?: ApiModelsFilter
|
||||
}
|
||||
|
||||
export const useApiModel = (id?: string) => {
|
||||
const { models } = useApiModels()
|
||||
export const useApiModel = ({ id, filter }: UseModelProps) => {
|
||||
const { models } = useApiModels(filter)
|
||||
return models.find((model) => model.id === id)
|
||||
}
|
||||
|
||||
@ -99,85 +99,86 @@
|
||||
},
|
||||
"title": "[to be translated]:高级设置"
|
||||
},
|
||||
"essential": "Βασικές Ρυθμίσεις",
|
||||
"prompt": "Ρυθμίσεις Προτροπής",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
"essential": "Βασικές Ρυθμίσεις",
|
||||
"mcps": "Διακομιστής MCP",
|
||||
"prompt": "Ρυθμίσεις Προτροπής",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"tools": {
|
||||
"approved": "[to be translated]:approved",
|
||||
"caution": "[to be translated]:Pre-approved tools bypass human review. Enable only trusted tools.",
|
||||
"description": "[to be translated]:Choose which tools can run without manual approval.",
|
||||
"requiresPermission": "[to be translated]:Requires permission when not pre-approved.",
|
||||
"tab": "[to be translated]:Pre-approved tools",
|
||||
"title": "[to be translated]:Pre-approved tools",
|
||||
"tools": {
|
||||
"approved": "εγκεκριμένο",
|
||||
"caution": "Εργαλεία προεγκεκριμένα παρακάμπτουν την ανθρώπινη αξιολόγηση. Ενεργοποιήστε μόνο έμπιστα εργαλεία.",
|
||||
"description": "Επιλέξτε ποια εργαλεία μπορούν να εκτελούνται χωρίς χειροκίνητη έγκριση.",
|
||||
"requiresPermission": "Απαιτείται άδεια όταν δεν έχει προεγκριθεί.",
|
||||
"tab": "Προεγκεκριμένα εργαλεία",
|
||||
"title": "Προεγκεκριμένα εργαλεία",
|
||||
"toggle": "{{defaultValue}}"
|
||||
}
|
||||
},
|
||||
|
||||
@ -99,85 +99,86 @@
|
||||
},
|
||||
"title": "[to be translated]:高级设置"
|
||||
},
|
||||
"essential": "Configuraciones esenciales",
|
||||
"prompt": "Configuración de indicaciones",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
"essential": "Configuraciones esenciales",
|
||||
"mcps": "Servidor MCP",
|
||||
"prompt": "Configuración de indicaciones",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"tools": {
|
||||
"approved": "[to be translated]:approved",
|
||||
"caution": "[to be translated]:Pre-approved tools bypass human review. Enable only trusted tools.",
|
||||
"description": "[to be translated]:Choose which tools can run without manual approval.",
|
||||
"requiresPermission": "[to be translated]:Requires permission when not pre-approved.",
|
||||
"tab": "[to be translated]:Pre-approved tools",
|
||||
"title": "[to be translated]:Pre-approved tools",
|
||||
"tools": {
|
||||
"approved": "aprobado",
|
||||
"caution": "Herramientas preaprobadas omiten la revisión humana. Habilita solo herramientas de confianza.",
|
||||
"description": "Elige qué herramientas pueden ejecutarse sin aprobación manual.",
|
||||
"requiresPermission": "Requiere permiso cuando no está preaprobado.",
|
||||
"tab": "Herramientas preaprobadas",
|
||||
"title": "Herramientas preaprobadas",
|
||||
"toggle": "{{defaultValue}}"
|
||||
}
|
||||
},
|
||||
|
||||
@ -99,85 +99,86 @@
|
||||
},
|
||||
"title": "[to be translated]:高级设置"
|
||||
},
|
||||
"essential": "Paramètres essentiels",
|
||||
"prompt": "Paramètres de l'invite",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
"essential": "Paramètres essentiels",
|
||||
"mcps": "Serveur MCP",
|
||||
"prompt": "Paramètres de l'invite",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"tools": {
|
||||
"approved": "[to be translated]:approved",
|
||||
"caution": "[to be translated]:Pre-approved tools bypass human review. Enable only trusted tools.",
|
||||
"description": "[to be translated]:Choose which tools can run without manual approval.",
|
||||
"requiresPermission": "[to be translated]:Requires permission when not pre-approved.",
|
||||
"tab": "[to be translated]:Pre-approved tools",
|
||||
"title": "[to be translated]:Pre-approved tools",
|
||||
"tools": {
|
||||
"approved": "approuvé",
|
||||
"caution": "Outils pré-approuvés contournent la révision humaine. Activez uniquement les outils de confiance.",
|
||||
"description": "Choisissez quels outils peuvent s'exécuter sans approbation manuelle.",
|
||||
"requiresPermission": "Nécessite une autorisation lorsqu'elle n'est pas préapprouvée.",
|
||||
"tab": "Outils pré-approuvés",
|
||||
"title": "Outils pré-approuvés",
|
||||
"toggle": "{{defaultValue}}"
|
||||
}
|
||||
},
|
||||
|
||||
@ -99,81 +99,82 @@
|
||||
},
|
||||
"title": "[to be translated]:高级设置"
|
||||
},
|
||||
"essential": "必須設定",
|
||||
"prompt": "プロンプト設定",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
"essential": "必須設定",
|
||||
"mcps": "MCPサーバー",
|
||||
"prompt": "プロンプト設定",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"tools": {
|
||||
"approved": "承認済み",
|
||||
"caution": "事前承認したツールは人によるレビューをスキップします。信頼できるツールのみ有効にしてください。",
|
||||
"tools": {
|
||||
"approved": "承認済み",
|
||||
"caution": "事前承認したツールは人によるレビューをスキップします。信頼できるツールのみ有効にしてください。",
|
||||
"description": "人による承認なしで実行できるツールを選択します。",
|
||||
"requiresPermission": "事前承認されていない場合は承認が必要です。",
|
||||
"tab": "事前承認済みツール",
|
||||
|
||||
@ -99,85 +99,86 @@
|
||||
},
|
||||
"title": "[to be translated]:高级设置"
|
||||
},
|
||||
"essential": "Configurações Essenciais",
|
||||
"prompt": "Configurações de Prompt",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
"essential": "Configurações Essenciais",
|
||||
"mcps": "Servidor MCP",
|
||||
"prompt": "Configurações de Prompt",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"tools": {
|
||||
"approved": "[to be translated]:approved",
|
||||
"caution": "[to be translated]:Pre-approved tools bypass human review. Enable only trusted tools.",
|
||||
"description": "[to be translated]:Choose which tools can run without manual approval.",
|
||||
"requiresPermission": "[to be translated]:Requires permission when not pre-approved.",
|
||||
"tab": "[to be translated]:Pre-approved tools",
|
||||
"title": "[to be translated]:Pre-approved tools",
|
||||
"tools": {
|
||||
"approved": "aprovado",
|
||||
"caution": "Ferramentas pré-aprovadas ignoram a revisão humana. Ative apenas ferramentas confiáveis.",
|
||||
"description": "Escolha quais ferramentas podem ser executadas sem aprovação manual.",
|
||||
"requiresPermission": "Requer permissão quando não pré-aprovado.",
|
||||
"tab": "Ferramentas pré-aprovadas",
|
||||
"title": "Ferramentas pré-aprovadas",
|
||||
"toggle": "{{defaultValue}}"
|
||||
}
|
||||
},
|
||||
|
||||
@ -99,85 +99,86 @@
|
||||
},
|
||||
"title": "[to be translated]:高级设置"
|
||||
},
|
||||
"essential": "Основные настройки",
|
||||
"prompt": "Настройки подсказки",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
"essential": "Основные настройки",
|
||||
"mcps": "MCP сервер",
|
||||
"prompt": "Настройки подсказки",
|
||||
"tooling": {
|
||||
"mcp": {
|
||||
"description": "[to be translated]:Connect MCP servers to unlock additional tools you can approve above.",
|
||||
"empty": "[to be translated]:No MCP servers detected. Add one from the MCP settings page.",
|
||||
"manageHint": "[to be translated]:Need advanced configuration? Visit Settings → MCP Servers.",
|
||||
"toggle": "[to be translated]:Toggle {{name}}"
|
||||
},
|
||||
"permissionMode": {
|
||||
"acceptEdits": {
|
||||
"behavior": "[to be translated]:Pre-approves trusted filesystem tools so edits run immediately.",
|
||||
"description": "[to be translated]:File edits and filesystem operations are automatically approved.",
|
||||
"title": "[to be translated]:Auto-accept file edits"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"bypassPermissions": {
|
||||
"behavior": "[to be translated]:Every tool is pre-approved automatically.",
|
||||
"description": "[to be translated]:All permission prompts are skipped — use with caution.",
|
||||
"title": "[to be translated]:Bypass permission checks",
|
||||
"warning": "[to be translated]:Use with caution — all tools will run without asking for approval."
|
||||
},
|
||||
"confirmChange": {
|
||||
"description": "[to be translated]:Switching modes updates the automatically approved tools.",
|
||||
"title": "[to be translated]:Change permission mode?"
|
||||
},
|
||||
"default": {
|
||||
"behavior": "[to be translated]:No tools are pre-approved automatically.",
|
||||
"description": "[to be translated]:Normal permission checks apply.",
|
||||
"title": "[to be translated]:Default (ask before continuing)"
|
||||
},
|
||||
"plan": {
|
||||
"behavior": "[to be translated]:Read-only tools only. Execution is disabled.",
|
||||
"description": "[to be translated]:Claude can only use read-only tools and presents a plan before execution.",
|
||||
"title": "[to be translated]:Planning mode (coming soon)"
|
||||
}
|
||||
},
|
||||
"preapproved": {
|
||||
"autoBadge": "[to be translated]:Added by mode",
|
||||
"autoDescription": "[to be translated]:This tool is auto-approved by the current permission mode.",
|
||||
"empty": "[to be translated]:No tools match your filters.",
|
||||
"mcpBadge": "[to be translated]:MCP tool",
|
||||
"requiresApproval": "[to be translated]:Requires approval when disabled",
|
||||
"search": "[to be translated]:Search tools",
|
||||
"toggle": "[to be translated]:Toggle {{name}}",
|
||||
"warning": {
|
||||
"description": "[to be translated]:Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||
"title": "[to be translated]:Pre-approved tools run without manual review."
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"autoTools": "[to be translated]:Auto: {{count}}",
|
||||
"customTools": "[to be translated]:Custom: {{count}}",
|
||||
"helper": "[to be translated]:Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||
"mcp": "[to be translated]:MCP: {{count}}",
|
||||
"mode": "[to be translated]:Mode: {{mode}}"
|
||||
},
|
||||
"steps": {
|
||||
"mcp": {
|
||||
"title": "[to be translated]:MCP servers"
|
||||
},
|
||||
"permissionMode": {
|
||||
"title": "[to be translated]:Step 1 · Permission mode"
|
||||
},
|
||||
"preapproved": {
|
||||
"title": "[to be translated]:Step 2 · Pre-approved tools"
|
||||
},
|
||||
"review": {
|
||||
"title": "[to be translated]:Step 3 · Review"
|
||||
}
|
||||
},
|
||||
"tab": "[to be translated]:Tooling & permissions"
|
||||
},
|
||||
"tools": {
|
||||
"approved": "[to be translated]:approved",
|
||||
"caution": "[to be translated]:Pre-approved tools bypass human review. Enable only trusted tools.",
|
||||
"description": "[to be translated]:Choose which tools can run without manual approval.",
|
||||
"requiresPermission": "[to be translated]:Requires permission when not pre-approved.",
|
||||
"tab": "[to be translated]:Pre-approved tools",
|
||||
"title": "[to be translated]:Pre-approved tools",
|
||||
"tools": {
|
||||
"approved": "одобрено",
|
||||
"caution": "Предварительно одобренные инструменты обходят проверку человеком. Включайте только доверенные инструменты.",
|
||||
"description": "Выберите, какие инструменты могут запускаться без ручного подтверждения.",
|
||||
"requiresPermission": "Требуется разрешение, если не предварительно одобрено.",
|
||||
"tab": "Предварительно одобренные инструменты",
|
||||
"title": "Предварительно одобренные инструменты",
|
||||
"toggle": "{{defaultValue}}"
|
||||
}
|
||||
},
|
||||
|
||||
@ -41,7 +41,8 @@ const HeaderNavbar: FC<Props> = ({ activeAssistant, setActiveAssistant, activeTo
|
||||
const { chat } = useRuntime()
|
||||
const { activeTopicOrSession, activeAgentId } = chat
|
||||
const { agent } = useAgent(activeAgentId)
|
||||
const agentModel = useApiModel(agent?.model)
|
||||
// TODO: filter is temporally for agent since it cannot get all models once
|
||||
const agentModel = useApiModel({ id: agent?.model, filter: { providerType: 'anthropic' } })
|
||||
|
||||
useShortcut('toggle_show_assistants', toggleShowAssistants)
|
||||
|
||||
@ -104,7 +105,9 @@ const HeaderNavbar: FC<Props> = ({ activeAssistant, setActiveAssistant, activeTo
|
||||
{activeTopicOrSession === 'topic' && <SelectModelButton assistant={assistant} />}
|
||||
{/* TODO: Show a select model button for agent. */}
|
||||
{/* FIXME: models endpoint doesn't return all models, so cannot found. */}
|
||||
{activeTopicOrSession === 'session' && <ApiModelLabel model={agentModel} />}
|
||||
{activeTopicOrSession === 'session' && (
|
||||
<ApiModelLabel classNames={{ container: 'text-xs' }} model={agentModel} />
|
||||
)}
|
||||
</HStack>
|
||||
<HStack alignItems="center" gap={8}>
|
||||
<UpdateAppButton />
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
import { Button, Tooltip } from '@heroui/react'
|
||||
import { Button, Input, Select, SelectedItems, SelectItem, Tooltip } from '@heroui/react'
|
||||
import { loggerService } from '@logger'
|
||||
import { ApiModelLabel } from '@renderer/components/ApiModelLabel'
|
||||
import { useApiModels } from '@renderer/hooks/agents/useModels'
|
||||
import { useUpdateAgent } from '@renderer/hooks/agents/useUpdateAgent'
|
||||
import { GetAgentResponse, UpdateAgentForm } from '@renderer/types'
|
||||
import { Input, Select } from 'antd'
|
||||
import { DefaultOptionType } from 'antd/es/select'
|
||||
import { ApiModel, GetAgentResponse, UpdateAgentForm } from '@renderer/types'
|
||||
import { Plus } from 'lucide-react'
|
||||
import { FC, useCallback, useMemo, useState } from 'react'
|
||||
import { FC, useCallback, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { AgentLabel, SettingsContainer, SettingsItem, SettingsTitle } from './shared'
|
||||
@ -42,13 +40,6 @@ const AgentEssentialSettings: FC<AgentEssentialSettingsProps> = ({ agent, update
|
||||
[agent, update]
|
||||
)
|
||||
|
||||
const modelOptions = useMemo(() => {
|
||||
return models.map((model) => ({
|
||||
value: model.id,
|
||||
label: <ApiModelLabel model={model} />
|
||||
})) satisfies DefaultOptionType[]
|
||||
}, [models])
|
||||
|
||||
const addAccessiblePath = useCallback(async () => {
|
||||
if (!agent) return
|
||||
|
||||
@ -83,6 +74,12 @@ const AgentEssentialSettings: FC<AgentEssentialSettingsProps> = ({ agent, update
|
||||
[agent, t, updateAccessiblePaths]
|
||||
)
|
||||
|
||||
const renderModels = useCallback((items: SelectedItems<ApiModel>) => {
|
||||
return items.map((item) => {
|
||||
const model = item.data ?? undefined
|
||||
return <ApiModelLabel key={model?.id} model={model} />
|
||||
})
|
||||
}, [])
|
||||
|
||||
if (!agent) return null
|
||||
|
||||
@ -97,7 +94,7 @@ const AgentEssentialSettings: FC<AgentEssentialSettingsProps> = ({ agent, update
|
||||
<Input
|
||||
placeholder={t('common.agent_one') + t('common.name')}
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
onValueChange={(value) => setName(value)}
|
||||
onBlur={() => {
|
||||
if (name !== agent.name) {
|
||||
updateName(name)
|
||||
@ -107,16 +104,24 @@ const AgentEssentialSettings: FC<AgentEssentialSettingsProps> = ({ agent, update
|
||||
/>
|
||||
</SettingsItem>
|
||||
<SettingsItem inline className="gap-8">
|
||||
<SettingsTitle>{t('common.model')}</SettingsTitle>
|
||||
<SettingsTitle id="model">{t('common.model')}</SettingsTitle>
|
||||
<Select
|
||||
options={modelOptions}
|
||||
value={agent.model}
|
||||
onChange={(value) => {
|
||||
updateModel(value)
|
||||
selectionMode="single"
|
||||
aria-labelledby="model"
|
||||
items={models}
|
||||
selectedKeys={[agent.model]}
|
||||
onSelectionChange={(keys) => {
|
||||
updateModel(keys.currentKey)
|
||||
}}
|
||||
className="max-w-80 flex-1"
|
||||
placeholder={t('common.placeholders.select.model')}
|
||||
/>
|
||||
renderValue={renderModels}>
|
||||
{(model) => (
|
||||
<SelectItem textValue={model.id}>
|
||||
<ApiModelLabel model={model} />
|
||||
</SelectItem>
|
||||
)}
|
||||
</Select>
|
||||
</SettingsItem>
|
||||
<SettingsItem>
|
||||
<SettingsTitle
|
||||
|
||||
Loading…
Reference in New Issue
Block a user