Просмотр исходного кода

fix(tui): Move animations toggle to global System category (resolves #10495) (#10497)

Ariane Emory 3 недель назад
Родитель
Сommit
3071720ce7

+ 9 - 0
packages/opencode/src/cli/cmd/tui/app.tsx

@@ -570,6 +570,15 @@ function App() {
         dialog.clear()
       },
     },
+    {
+      title: kv.get("animations_enabled", true) ? "Disable animations" : "Enable animations",
+      value: "app.toggle.animations",
+      category: "System",
+      onSelect: (dialog) => {
+        kv.set("animations_enabled", !kv.get("animations_enabled", true))
+        dialog.clear()
+      },
+    },
   ])
 
   createEffect(() => {

+ 0 - 9
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -570,15 +570,6 @@ export function Session() {
         dialog.clear()
       },
     },
-    {
-      title: animationsEnabled() ? "Disable animations" : "Enable animations",
-      value: "session.toggle.animations",
-      category: "Session",
-      onSelect: (dialog) => {
-        setAnimationsEnabled((prev) => !prev)
-        dialog.clear()
-      },
-    },
     {
       title: "Page up",
       value: "session.page.up",