Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,49 @@

## 决策

### 状态栏只投影会话,日志面板不接管协议

macOS 的 LSP 入口始终保留,即使没有源文件、可选语言模块尚未激活或没有运行会话。
列表只能来自平台插件管理器中已接受、已注册且当前启用的插件的语言服务器声明;
内置但作为可管理插件注册的语言服务也必须通过同一个模块启用检查,不能默认列出。
宿主内置语言目录、文件扩展名识别和工具候选不等于服务器注册,不能填充此列表。
禁用、隔离、安全模式抑制、等待首次重启注册或卸载的插件不贡献行。

名称复用现有服务器可执行名字段。插件直接声明 packaged/systemCommand 时取其
`executableNames`;runtime 启动不能把 `java` 或 `node` 当服务器名,改读该插件
languageID 对应描述元数据已有的 `languageServerLaunch.executableNames`(例如 jdtls)。
元数据只补名称,不能绕过已启用插件注册来新增行。没有这个字段时直接显示插件 ID,
不回退语言名、插件展示名或服务器自报名称;不新增清单字段、版本或工具名映射。
状态与版本继续由现有会话投影,代码诊断不改变服务器状态,不按当前文档类型过滤。
空列表仍提供日志和设置入口;批量操作只针对已有会话,不因打开菜单启动服务器。
颜色使用现有主题的成功、强调、警告和错误色,与 LSP 设置页一致。

单个或全部服务器的停止与重启只影响当前会话,不改工作区启用偏好。停止同时
使该提供方已排队的激活请求失效;下一次打开、切换或编辑匹配文档仍可按需启动。
专属准备任务通过在依赖组装处登记的取消回调结束,通用状态菜单不按语言名称分支。
重启先发起停止,等待旧进程的终止事件及异步资源释放,再重新同步匹配的打开文档;
没有打开文档时也重启同一个预热提供方,不把“重启”静默变成“停止”。等待期间保留
`.stopping` 状态和提供方的占位,文档激活不能另起替代进程。停止完成等待有本地期限;
超时返回失败并保留占位,不冒险与旧 JDT 工作区目录锁重叠。等待期间的再次停止、
工作区替换或停用会撤销重启意图,旧关闭完成不能复活服务器。异步/远程启动在取消后
才返回时,同样先停止并销毁该迟到会话,再释放包快照。

重建 Java 索引只重置 Java 的应用状态,不调用工作区整体重置。其他语言服务的
运行投影、日志选择及订阅必须保留;不能清空被 `removeDuplicates` 去重的共享投影后,
指望日志或无变化的状态通知重新填回。

“查看日志”打开或聚焦普通编辑器标签页中的 LSP 日志,不新增底部工具窗口。
日志标签复用混合标签顺序、拖动分组、选择和关闭机制;切换服务器仍使用同一标签。它直接观察现有的最多 100 条会话事件
和服务器输出,按提供方与最低级别筛选;日志更新不经整个 AppModel 广播。
“清空视图”只记住所选提供方当前可见缓冲条目的身份,不删除持久诊断日志,
也不影响其他提供方。标记随缓冲淘汰,不建立另一个无界日志存储。

正确做法是按当前会话事件显示真实内容。不要在 Swift 再实现 JSON-RPC(语言服务器
使用的请求响应协议)抓包器,或把现有文本日志复制成 Server Trace、RPC Messages
三个假通道。当前 Core 没有提供原始跟踪/消息采集,日志标签的工具栏明确提示不可用;
将来确需采集时,应在 Core 既有协议所有者处设计显式启用、脱敏和预算,再扩展契约。
本次没有新缓存目录、下载或安装资源写入,运行时只读发行基线不变。

LSP 子进程、stdio、JSON-RPC 状态机、文档版本、请求 deadline、诊断和
结果归一化统一收归 Rust Core([`rust/lithe-core/src/lsp/`](../../../../rust/lithe-core/src/lsp/)),
平台 adapter 只负责可执行文件与运行环境发现。Swift 只保留 UI 投影和
Expand Down Expand Up @@ -295,6 +338,12 @@ capability 为准。

## 验证

macOS 状态栏投影、停止/重启的偏好边界、过期激活身份、按服务器过滤与清空由
`macos/Tests/LitheTests/LanguageServerStatusTests.swift` 覆盖。使用
`./.agents/skills/write-stable-tests/scripts/test-stability-macos.sh -- --filter LanguageServerStatusTests`
记录逐项计时,并运行 `./scripts/macos/verify/verify-runtime-bundle-immutability.sh`。
这些组件回归不替代真实多语言服务、明暗主题及编辑器标签交互验收。

本次等待策略由 `jdt_progress.rs` 的受控时钟测试和 `engine.rs` 的模拟服务测试
覆盖:45 秒静默仍可就绪、警告去重、变化后再次警告、持续进展也不能越过总期限。
共享示例位于 `shared/fixtures/lsp/jdt-readiness-v1.json`。Windows 的
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Git 的工作区、工作树、目录、分支、历史提交和 Stash/Shelf 比
关闭或移走最后一个标签后合并空组;新标签进入当前聚焦的组。文件和会话生命周期不交给布局树。
分隔器继续使用 `LitheSplitPaneView`,尺寸变化留在局部视图,只在释放后提交比例。
分组是当前项目会话状态,本次不增加重启恢复编辑分屏或跨窗口传输。
LSP 日志同样是普通编辑器标签,不登记底部工具窗口。单个工作区只打开一个日志标签,
再次查看另一服务器时复用标签并更新筛选;标签可参与重排和分组。日志不拥有文件缓冲区,
选择它应清除活动文件/媒体/终端投影,关闭后通过混合标签选择恢复原内容,不能关闭未保存文件。
文件通过功能模型直接打开时,也必须让日志标签让出活动选择;工作区重置移除日志标签。
与数据库 PR #17 集成后,数据库标签继续使用其共享工作区和查询状态,统一保留在同一个编辑分组,只允许组内重排;不能直接开放跨组移动,否则两个分组会显示同一数据库上下文。数据库工具窗口及 Services 工具窗口仍支持停靠分组。

### Git Diff 也属于普通编辑标签
Expand Down
34 changes: 34 additions & 0 deletions macos/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -691,13 +691,15 @@
"Clear Logs" = "Clear Logs";
"Clear Override" = "Clear Override";
"Clear Project History…" = "Clear Project History…";
"Clear View" = "Clear View";
"Clear branch filter" = "Clear branch filter";
"Clear build output" = "Clear build output";
"Clear collected logs?" = "Clear collected logs?";
"Clear conflict filter" = "Clear conflict filter";
"Clear date filter" = "Clear date filter";
"Clear debug output" = "Clear debug output";
"Clear log search" = "Clear log search";
"Clear only the selected server's visible logs. Collected diagnostic logs are kept." = "Clear only the selected server's visible logs. Collected diagnostic logs are kept.";
"Clear path filter" = "Clear path filter";
"Clear run output" = "Clear run output";
"Clear search" = "Clear search";
Expand Down Expand Up @@ -1801,6 +1803,7 @@
"Increase Font Size" = "Increase Font Size";
"Indentation" = "Indentation";
"Index and working tree" = "Index and working tree";
"Info" = "Info";
"Information" = "Information";
"Inherit" = "Inherit";
"Inherit project JDK" = "Inherit project JDK";
Expand Down Expand Up @@ -1950,10 +1953,13 @@
"Keymap…" = "Keymap…";
"Korean characters" = "Korean characters";
"Kotlin Support" = "Kotlin Support";
"LSP" = "LSP";
"LSP Logs" = "LSP Logs";
"Labels" = "Labels";
"Labels and assignees" = "Labels and assignees";
"Language" = "Language";
"Language Server" = "Language Server";
"Language Server Settings..." = "Language Server Settings...";
"Language Service" = "Language Service";
"Language Services" = "Language Services";
"Language edit targets a file outside the workspace." = "Language edit targets a file outside the workspace.";
Expand Down Expand Up @@ -2458,6 +2464,7 @@
"No matching commits in the loaded history." = "No matching commits in the loaded history.";
"No matching conversations" = "No matching conversations";
"No matching items" = "No matching items";
"No matching language server logs" = "No matching language server logs";
"No matching logs" = "No matching logs";
"No matching messages" = "No matching messages";
"No matching plugins" = "No matching plugins";
Expand Down Expand Up @@ -2488,6 +2495,7 @@
"No pull requests match the selected state." = "No pull requests match the selected state.";
"No recent progress has been received. The task is still active." = "No recent progress has been received. The task is still active.";
"No recent projects" = "No recent projects";
"No registered language servers" = "No registered language servers";
"No release is available yet" = "No release is available yet";
"No remembered choices. Check “Remember my choice” in the quit dialog to skip the question for a kind of service next time." = "No remembered choices. Check “Remember my choice” in the quit dialog to skip the question for a kind of service next time.";
"No remote" = "No remote";
Expand Down Expand Up @@ -2547,6 +2555,7 @@
"Not running" = "Not running";
"Not selected" = "Not selected";
"Not set" = "Not set";
"Not started" = "Not started";
"Not supported on %@ yet." = "Not supported on %@ yet.";
"Not tested" = "Not tested";
"Not used" = "Not used";
Expand Down Expand Up @@ -3186,12 +3195,14 @@
"Response" = "Response";
"Responses API" = "Responses API";
"Restart" = "Restart";
"Restart All Servers" = "Restart All Servers";
"Restart Language Servers" = "Restart Language Servers";
"Restart Lithe" = "Restart Lithe";
"Restart Lithe to finish uninstalling %@, then install the community plugin %@ from the Marketplace." = "Restart Lithe to finish uninstalling %@, then install the community plugin %@ from the Marketplace.";
"Restart Lithe to finish uninstalling %@, then install this plugin." = "Restart Lithe to finish uninstalling %@, then install this plugin.";
"Restart Lithe to load the updated page." = "Restart Lithe to load the updated page.";
"Restart Lithe to use %@." = "Restart Lithe to use %@.";
"Restart Server" = "Restart Server";
"Restart required" = "Restart required";
"Restart run" = "Restart run";
"Restart service" = "Restart service";
Expand Down Expand Up @@ -3465,6 +3476,7 @@
"Sensitive files are not sent to an AI provider." = "Sensitive files are not sent to an AI provider.";
"Separate arguments with spaces; quote an argument that contains spaces." = "Separate arguments with spaces; quote an argument that contains spaces.";
"Server" = "Server";
"Server Logs" = "Server Logs";
"Server URL" = "Server URL";
"Server address" = "Server address";
"Server default" = "Server default";
Expand Down Expand Up @@ -3578,6 +3590,7 @@
"Showing available matches." = "Showing available matches.";
"Showing the previous Java entries while the Java language service prepares the project." = "Showing the previous Java entries while the Java language service prepares the project.";
"Shown across the entire workbench, including toolbars, project tree, editor, tabs, terminals, and status bar." = "Shown across the entire workbench, including toolbars, project tree, editor, tabs, terminals, and status bar.";
"Shows session events and server output. Server Trace and RPC message capture are not available." = "Shows session events and server output. Server Trace and RPC message capture are not available.";
"Side-by-side" = "Side-by-side";
"Side-by-side view" = "Side-by-side view";
"Sign in again" = "Sign in again";
Expand Down Expand Up @@ -3708,6 +3721,7 @@
"Starting commit (optional)" = "Starting commit (optional)";
"Starting module..." = "Starting module...";
"Starting the Agent…" = "Starting the Agent…";
"Starts again when a matching document is opened or edited." = "Starts again when a matching document is opened or edited.";
"Starts no programs." = "Starts no programs.";
"Starts on demand when a matching file is opened" = "Starts on demand when a matching file is opened";
"Stash" = "Stash";
Expand All @@ -3732,13 +3746,15 @@
"Sticky scroll" = "Sticky scroll";
"Stop" = "Stop";
"Stop %@" = "Stop %@";
"Stop All Servers" = "Stop All Servers";
"Stop Camera" = "Stop Camera";
"Stop Debug" = "Stop Debug";
"Stop Loading" = "Stop Loading";
"Stop Maven task" = "Stop Maven task";
"Stop Microphone" = "Stop Microphone";
"Stop Recording" = "Stop Recording";
"Stop Run" = "Stop Run";
"Stop Server" = "Stop Server";
"Stop Tracking Branch" = "Stop Tracking Branch";
"Stop active execution" = "Stop active execution";
"Stop all services" = "Stop all services";
Expand Down Expand Up @@ -4019,6 +4035,7 @@
"The interface language changes immediately. English is the default." = "The interface language changes immediately. English is the default.";
"The item can be recovered from the macOS Trash." = "The item can be recovered from the macOS Trash.";
"The language server could not apply this setting. Restart it to use the new value." = "The language server could not apply this setting. Restart it to use the new value.";
"The language server is still stopping. Try again after it has stopped." = "The language server is still stopping. Try again after it has stopped.";
"The language server this build system uses is not available. Open a file of the language and try again." = "The language server this build system uses is not available. Open a file of the language and try again.";
"The language service that hosts the debug adapter is unavailable." = "The language service that hosts the debug adapter is unavailable.";
"The latest stable release will be downloaded in full and replace this AutoBuild after you confirm installation. Projects and settings are kept, but AutoBuild-only settings may not work in the stable release." = "The latest stable release will be downloaded in full and replace this AutoBuild after you confirm installation. Projects and settings are kept, but AutoBuild-only settings may not work in the stable release.";
Expand Down Expand Up @@ -5378,6 +5395,7 @@
"native.clearDebugOutput" = "Clear debug output";
"native.clearGitConsole" = "Clear Git console";
"native.clearLogSearch" = "Clear log search";
"native.clearLogView" = "Clear View";
"native.clearLogs" = "Clear Logs";
"native.clearOverride" = "Clear Override";
"native.clearPathFilter" = "Clear path filter";
Expand Down Expand Up @@ -6738,6 +6756,8 @@
"native.languageServerReturnedAnInvalidTextRange" = "Language server returned an invalid text range.";
"native.languageServerReturnedOverlappingTextEdits" = "Language server returned overlapping text edits.";
"native.languageServerSessionStoppedBeforeTheRequestCompleted" = "Language server session stopped before the request completed.";
"native.languageServerSettingsAction" = "Language Server Settings...";
"native.languageServerStillStopping" = "The language server is still stopping. Try again after it has stopped.";
"native.languageServerToolConfigurationChanged" = "Language server tool configuration changed";
"native.languageServers" = "Language servers";
"native.languageService" = "Language Service";
Expand Down Expand Up @@ -6951,6 +6971,7 @@
"native.log.variant2" = "Log";
"native.logDirectory" = "Log directory";
"native.logFilter" = "Log filter";
"native.logInfoLevel" = "Info";
"native.logLevel" = "Log level";
"native.logLocations" = "Log locations";
"native.logMessage" = "Log message";
Expand All @@ -6966,6 +6987,13 @@
"native.low" = "Low";
"native.lowEffortAndASmallOutputLimitAreRecommendedForFastCommitMessageGeneration" = "Low effort and a small output limit are recommended for fast commit-message generation.";
"native.lowRecommended" = "Low (recommended)";
"native.lspAvailableLogChannels" = "Shows session events and server output. Server Trace and RPC message capture are not available.";
"native.lspClearViewHint" = "Clear only the selected server's visible logs. Collected diagnostic logs are kept.";
"native.lspLogsTitle" = "LSP Logs";
"native.lspNotStarted" = "Not started";
"native.lspServerLogs" = "Server Logs";
"native.lspStatusLabel" = "LSP";
"native.lspStopOnDemandHint" = "Starts again when a matching document is opened or edited.";
"native.luaSupport" = "Lua Support";
"native.macosCouldNotPrepareTheUpdateDiskImageDownloadTheReleaseManuallyAndTryAgain" = "macOS could not prepare the update disk image. Download the release manually and try again.";
"native.macosCouldNotPrepareTheUpdateDiskImageOpenTheReleasePageAndInstallItManually" = "macOS could not prepare the update disk image. Open the Release page and install it manually.";
Expand Down Expand Up @@ -7275,6 +7303,7 @@
"native.noMatchingConversations" = "No matching conversations";
"native.noMatchingHooks" = "No matching Hooks.";
"native.noMatchingItems" = "No matching items";
"native.noMatchingLanguageServerLogs" = "No matching language server logs";
"native.noMatchingLogs" = "No matching logs";
"native.noMatchingMcpServers" = "No matching MCP servers";
"native.noMatchingMessages" = "No matching messages";
Expand Down Expand Up @@ -7313,6 +7342,7 @@
"native.noPullRequestsMatchTheSelectedState" = "No pull requests match the selected state.";
"native.noRecentProgressHasBeenReceivedTheTaskIsStillActive" = "No recent progress has been received. The task is still active.";
"native.noRecentProjects" = "No recent projects";
"native.noRegisteredLanguageServers" = "No registered language servers";
"native.noReleaseIsAvailableYet" = "No release is available yet";
"native.noRememberedChoicesCheckRememberMyChoiceInTheQuitDialogToSkipTheQuestionForAKi279db9aaf7" = "No remembered choices. Check “Remember my choice” in the quit dialog to skip the question for a kind of service next time.";
"native.noRemote" = "No remote";
Expand Down Expand Up @@ -7998,6 +8028,7 @@
"native.response" = "Response";
"native.responsesAPI" = "Responses API";
"native.restart" = "Restart";
"native.restartAllServers" = "Restart All Servers";
"native.restartLanguageServers" = "Restart Language Servers";
"native.restartLithe" = "Restart Lithe";
"native.restartLitheToFinishUninstallingThenInstallTheCommunityPluginFromTheMarketplace" = "Restart Lithe to finish uninstalling %1$@, then install the community plugin %2$@ from the Marketplace.";
Expand All @@ -8006,6 +8037,7 @@
"native.restartLitheToUseArg1" = "Restart Lithe to use %1$@.";
"native.restartRequired" = "Restart required";
"native.restartRun" = "Restart run";
"native.restartServer" = "Restart Server";
"native.restartService" = "Restart service";
"native.restore" = "Restore";
"native.restoreAllDefaults" = "Restore All Defaults";
Expand Down Expand Up @@ -8516,6 +8548,7 @@
"native.stepOut" = "Step out";
"native.stepOver" = "Step over";
"native.stopActiveExecution" = "Stop active execution";
"native.stopAllServers" = "Stop All Servers";
"native.stopAllServices" = "Stop all services";
"native.stopAndClose" = "Stop and Close";
"native.stopAndQuit" = "Stop and Quit";
Expand All @@ -8532,6 +8565,7 @@
"native.stopRun" = "Stop Run";
"native.stopRun.variant2" = "Stop run";
"native.stopSelected" = "Stop selected";
"native.stopServer" = "Stop Server";
"native.stopService" = "Stop service";
"native.stopSessionNamed" = "Stop %1$@";
"native.stopTestRun" = "Stop test run";
Expand Down
Loading
Loading