improve the lsp message and ace to codemirror related clarrification#2203
Conversation
Greptile SummaryThis PR makes two related improvements: it adds a terminal-accessibility gate to the LSP client so that language-server features are silently skipped for SAF, external, and remote workspaces by default (with a new opt-in setting), and it replaces the hard-blocking "plugin not supported" error on the plugin page with a softer inline warning, while also making all plugin-list API requests pass the current editor type as a query parameter.
Confidence Score: 3/5Needs fixes before merging: the new LegacyEditorWarning component always displays a hardcoded English string because its i18n key is absent from all locale files, and five languages that previously had native translations for the LSP settings note now show English instead. The LSP workspace-gating logic and the opt-in setting are well-structured and default to the safe path. The plugin-page refactor correctly converts a hard block into a softer warning and fixes a prior bug with null supported_editor. However, two i18n regressions undermine the change: the legacy-plugin-warning key is never defined anywhere (meaning all users always see the hardcoded English fallback), and five locales lose their native settings-note-lsp-settings translations. These are concrete present-state defects rather than hypothetical concerns. src/pages/plugin/plugin.view.js and src/lang/en-us.json (missing legacy-plugin-warning key); src/lang/hu-hu.json, id-id.json, uk-ua.json, zh-cn.json, zh-hant.json (native translations replaced with English) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[File opened in editor] --> B[applyLspSettings called]
B --> C[lspClientManager.setOptions allowNonTerminalWorkspace]
C --> D{attach / format called}
D --> E[#canUseLspForWorkspace]
E --> F{allowNonTerminalWorkspace === true?}
F -- Yes --> G[Proceed with LSP]
F -- No --> H{file.SAFMode?}
H -- Yes --> I[Skip LSP return false/empty]
H -- No --> J[isTerminalAccessibleLspUri rootUri or uri]
J --> K{scheme?}
K -- file / untitled --> G
K -- content://com.foxdebug.acode*.documents/ --> G
K -- other / none --> I
subgraph Plugin Page
P1[Plugin fetched] --> P2{supported_editor?}
P2 -- null/undefined --> P3[isSupported = true]
P2 -- ace / other --> P4[isPluginEditorSupported check]
P4 -- matches SUPPORTED_EDITOR or all --> P3
P4 -- no match --> P5[isSupported = false showEditorSupportWarning = true]
P5 --> P6[LegacyEditorWarning shown Install still allowed]
P3 --> P7[Normal install buttons]
end
|
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…rangCoder/Acode into some-fixes-to-ckarify-things
Fixes: #2199