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

fix(sidebar): fix logic and missleading message #26469 (#26470)

Polo123456789 4 месяцев назад
Родитель
Сommit
092bc674a5
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/opencode/src/cli/cmd/tui/feature-plugins/sidebar/lsp.tsx

+ 2 - 2
packages/opencode/src/cli/cmd/tui/feature-plugins/sidebar/lsp.tsx

@@ -8,7 +8,7 @@ function View(props: { api: TuiPluginApi }) {
   const [open, setOpen] = createSignal(true)
   const [open, setOpen] = createSignal(true)
   const theme = () => props.api.theme.current
   const theme = () => props.api.theme.current
   const list = createMemo(() => props.api.state.lsp())
   const list = createMemo(() => props.api.state.lsp())
-  const off = createMemo(() => props.api.state.config.lsp === false)
+  const off = createMemo(() => !props.api.state.config.lsp)
 
 
   return (
   return (
     <box>
     <box>
@@ -23,7 +23,7 @@ function View(props: { api: TuiPluginApi }) {
       <Show when={list().length <= 2 || open()}>
       <Show when={list().length <= 2 || open()}>
         <Show when={list().length === 0}>
         <Show when={list().length === 0}>
           <text fg={theme().textMuted}>
           <text fg={theme().textMuted}>
-            {off() ? "LSPs have been disabled in settings" : "LSPs will activate as files are read"}
+            {off() ? "LSPs are disabled" : "LSPs will activate as files are read"}
           </text>
           </text>
         </Show>
         </Show>
         <For each={list()}>
         <For each={list()}>