mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +08:00
fix: align OpenClaw tool permission profiles with upstream schema (#1355)
* fix: align OpenClaw tool permission profiles with upstream schema * fix: remove dead i18n keys and save-blocking validation - Remove unused `profiles.*` nested i18n keys (dead code, ToolsPanel uses flat `profileMinimal` etc.) - Remove `invalidProfile` i18n key no longer referenced - Remove handleSave validation that blocked saving allow/deny when legacy profile exists - Keep the profile destructuring cleanup from the original PR --------- Co-authored-by: Your Name <your.email@example.com> Co-authored-by: Jason <farion1231@gmail.com>
This commit is contained in:
@@ -77,10 +77,10 @@ const ToolsPanel: React.FC = () => {
|
||||
|
||||
const handleSave = async () => {
|
||||
try {
|
||||
const { allow, deny, ...other } = config;
|
||||
const { profile, allow, deny, ...other } = config;
|
||||
const newConfig: OpenClawToolsConfig = {
|
||||
...other,
|
||||
profile: config.profile,
|
||||
profile,
|
||||
allow: allowList.map((item) => item.value).filter((s) => s.trim()),
|
||||
deny: denyList.map((item) => item.value).filter((s) => s.trim()),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user