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 @@ -59,7 +59,7 @@ Core 能校验一个能力,不代表宿主能运行它。宿主在 `plugins.de

能力表放在宿主代码里,写在能力实现的旁边,Core 不再按平台去猜。原来按 `darwin-` 前缀和级别写死的判断,就是 Core 替宿主猜、又容易和宿主实现漂移的例子。

macOS 宿主接受级别 1 到 3(`supportedDeclarativeAPIVersions = [1, 2, 3]`),能力表是 `PluginManifest.hostCapabilities`,在校验、索引和安装审查时都发给 Core;其中的 `buildSystems: [1]` 随 macOS 的 Build 工具窗口一起加入,但 macOS 尚未实现 Provider,所以不声明 `buildProviders`;市场过滤、清单校验和安装审查都会拒绝需要它的插件,纯模板构建插件仍可用。Core 自己支持 `buildProviders: 1`,不传宿主表时仍可校验并生成 Provider 计划。`vcsProviders: 1` 也是这样:Core 已经能校验清单、识别工作副本根并转发请求,但 macOS 和 Windows 都还没有接入 VCS Provider 会话,所以两端的能力表都不包含它,需要它的插件在两端都不可安装。Windows 还没有声明式插件宿主,不发送能力表,所以 Windows 不列出级别 3 的插件。宿主接入某个能力时,要做两件事:让宿主接受级别 3,并在宿主自己的能力表里加上这个能力的版本,而且只在宿主真正能运行它时才加。
macOS 宿主接受级别 1 到 3(`supportedDeclarativeAPIVersions = [1, 2, 3]`),能力表是 `PluginManifest.hostCapabilities`,在校验、索引和安装审查时都发给 Core;其中的 `buildSystems: [1]` 随 macOS 的 Build 工具窗口一起加入,`buildProviders: [1]` 在 macOS 接入构建 Provider 会话后才加入。`vcsProviders: [1]` 同样等 macOS 接入 VCS Provider 会话(版本控制工具窗口、项目树状态和文件移动)后才加入,见[统一 VCS 模型提案](../../proposed/architecture/2026-10-22-unified-vcs-provider-model.md)的 P3。Core 自己支持 `buildProviders: 1` 和 `vcsProviders: 1`,不传宿主表时仍可校验清单、生成 Provider 计划、识别工作副本根并转发请求。Windows 还没有声明式插件宿主,不发送能力表,所以 Windows 不列出级别 3 的插件。宿主接入某个能力时,要做两件事:让宿主接受级别 3,并在宿主自己的能力表里加上这个能力的版本,而且只在宿主真正能运行它时才加。

### 3. 市场索引带上能力版本

Expand Down

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions Plugins/mac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ Cargo-specific compatibility tests run in the plugin repository against a pinned
Lithe Core through its public JSON API. This repository retains generic plugin
contract tests; it does not keep Cargo community plugin snapshots.

## Subversion community plugin

[Subversion](https://github.com/Lithe-IDEA/lithe-plugin-svn)
(`io.github.lithe-idea.svn-support`) is a VCS provider plugin maintained and
released independently in the same way. It needs a Lithe build that declares
the `vcsProviders` host capability, and runs the user's `svn` 1.8+ through a
Node SDK provider. Its svn output fixtures and Core compatibility tests live in
the plugin repository. This repository keeps the generic VCS provider contract,
its manifest fixture, and the Core tests; the SDK's sample provider
(`sample-vcs`) lives with the SDK in
[lithe-plugin-docs](https://github.com/Lithe-IDEA/lithe-plugin-docs).

## Downloadable official plugins

No downloadable official plugin is configured right now:
Expand Down
70 changes: 70 additions & 0 deletions macos/Resources/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -3716,6 +3716,76 @@
/* 内嵌 HTML 预览浏览器:右键菜单、打印和 PDF。 */
"Print…" = "打印…";
"Export as PDF…" = "导出为 PDF…";

/* 插件 VCS Provider:安装审核、工具窗口、项目树和差异比较。 */
"%@ provider (inside the plugin)" = "%@ Provider(插件内置)";
"%@ provider (installed on this Mac)" = "%@ Provider(使用本机已安装的程序)";
"%1$@ provider (runs with %2$@)" = "%1$@ Provider(使用 %2$@ 运行)";
"Client: %@" = "客户端:%@";
"May connect to the repository server" = "可能连接仓库服务器";
"Show %@ Diff" = "显示 %@ 差异";
"%1$@ does not provide %2$@ because %3$@ already does." = "%3$@ 已提供 %2$@,因此不再使用 %1$@ 提供的版本。";
"Committing…" = "正在提交…";
"Rolling back…" = "正在回滚…";
"Updating…" = "正在更新…";
"Marking as resolved…" = "正在标记为已解决…";
"Cleaning up…" = "正在清理…";
"Moving…" = "正在移动…";
"Wait for the running version control action to finish." = "请等待正在执行的版本控制操作完成。";
"This working copy is no longer available. Refresh and try again." = "此工作副本已不可用。请刷新后重试。";
"Authentication failed. Lithe cannot ask for credentials yet: sign in once with the command-line client so it stores them, then try again." = "认证失败。Lithe 暂时无法询问凭据:请先用命令行客户端登录一次并保存凭据,然后重试。";
"The working copy is out of date. Update it, then commit again." = "工作副本已过期。请先更新,再重新提交。";
"The action stopped on conflicted files. Resolve them, then try again." = "操作因冲突文件而停止。请先解决冲突,然后重试。";
"The working copy is locked by an interrupted action. Run Cleanup, then try again." = "工作副本被中断的操作锁定。请先执行清理,然后重试。";
"This working copy format is not supported. Upgrade it with the command-line client." = "不支持此工作副本格式。请用命令行客户端升级。";
"The version control client could not be run. Check that it is installed." = "无法运行版本控制客户端。请检查它是否已安装。";
"Lithe could not evaluate the version control data: %@" = "Lithe 无法解析版本控制数据:%@";
"This version control provider does not support this action." = "此版本控制 Provider 不支持该操作。";
"The version control provider failed to start." = "版本控制 Provider 启动失败。";
"The version control provider stopped before it was ready." = "版本控制 Provider 在就绪前已停止。";
"Version control provider" = "版本控制 Provider";
"Missing" = "缺失";
"Replaced" = "已替换";
"Type changed" = "类型已更改";
"Unversioned" = "未版本控制";
"Ignored" = "已忽略";
"Switched" = "已切换";
"No revisions" = "没有修订版本";
"More paths changed than are shown." = "更改的路径多于此处显示的数量。";
"Open File" = "打开文件";
"Binary files cannot be compared." = "无法比较二进制文件。";
"The file is too large to compare." = "文件过大,无法比较。";
"Base revision" = "基线版本";
"Roll back the selected changes?" = "回滚选中的更改?";
"Local edits to these files are lost." = "这些文件的本地修改将会丢失。";
"Mark as Resolved" = "标记为已解决";
"Clean Up Working Copy" = "清理工作副本";
"More Actions" = "更多操作";
"Working copy" = "工作副本";
"%@ holds the metadata of several version control systems. Choose the one that manages it." = "%@ 包含多个版本控制系统的元数据。请选择管理它的版本控制系统。";
"The workspace" = "工作区";
"The workspace is too large to search completely; some working copies may be missing." = "工作区过大,无法完整搜索;可能有工作副本未被识别。";
"There are too many changes to list; some are not shown." = "更改过多,部分未显示。";
"Detecting working copies…" = "正在识别工作副本…";
"Reading changes…" = "正在读取更改…";
"No %@ working copy was detected in this workspace." = "此工作区中没有识别到 %@ 工作副本。";
"Detect Again" = "重新识别";
"Moved from %@" = "从 %@ 移动";
"Tree conflict" = "树冲突";
"Properties modified" = "属性已修改";
"Locked in this working copy" = "已在此工作副本中锁定";
"Locked by another user" = "已被其他用户锁定";
"Show History" = "显示历史";
"%lld files selected" = "已选择 %lld 个文件";
"Committed revision %@." = "已提交修订版本 %@。";
"Committed." = "已提交。";
"Updated to revision %@." = "已更新到修订版本 %@。";
"Updated." = "已更新。";
"%lld files have conflicts." = "%lld 个文件存在冲突。";
"The working copy was cleaned up." = "工作副本已清理。";
"History of %@" = "%@ 的历史";
"Show All" = "显示全部";
"Restart Lithe to use %@." = "重启 Lithe 后即可使用 %@。";
"Instructions" = "指令";
"Global instructions" = "全局指令";
"Instruction Agent" = "指令所属 Agent";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ final class AppServices {
/// Gives build providers that share a language server the language
/// sessions; `nil` when the platform starts no build providers.
var connectBuildProviderLanguageSessions: ((@escaping @MainActor () -> LanguageToolingSessionManager?) -> Void)?
/// Plugin VCS providers; `nil` when no installed plugin declares one.
var vcsProviders: VcsProvidersFeatureModel?
let moduleRuntime: ModuleRuntime
let pluginManager: any PluginManaging
let pluginMarketplace: any PluginMarketplaceServicing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ enum WorkspaceProjectionComposition {
guard let feature = await model?.activateHistoryModule() else { return }
await feature.relocateHistory(from: source, to: destination)
},
moveTrackedItem: { [weak model] source, destination in
await model?.vcsProvidersFeature?.move(from: source, to: destination) ?? false
},
relocateOpenDocuments: { [weak document] source, destination in
document?.relocateOpenDocuments(from: source, to: destination)
},
Expand Down
Loading
Loading