Skip to content

Add RimeSharp PowerShell module#2

Open
amorphobia wants to merge 2 commits into
rimeinn:masterfrom
amorphobia:powershell-pr
Open

Add RimeSharp PowerShell module#2
amorphobia wants to merge 2 commits into
rimeinn:masterfrom
amorphobia:powershell-pr

Conversation

@amorphobia

Copy link
Copy Markdown
Member

概述

新增 RimeSharp.PowerShell 模块,为 PowerShell 提供基于 RimeSharp 的 RIME 输入法控制接口。

主要改动

  • 新增 PowerShell 模块项目。
  • 新增 RIME 生命周期管理 cmdlet。
  • 新增会话、按键、候选词、分页、Schema、选项和通知相关 cmdlet。
  • 新增 PowerShell 类型封装和托管快照,避免将原生指针直接暴露给 PowerShell。
  • 新增 API Console 示例,演示如何通过 PowerShell 使用 RIME API。
  • RimeSharp.PowerShell 添加到解决方案文件。

必要的绑定修正

  • RimeSharp/Rime.cs 中暴露 FindSession API,用于验证 PowerShell 会话是否仍然有效。
  • 修正 RimeLevers.GetSelectedSchemaList,使其调用正确的原生函数。

验证

  • dotnet restore
  • dotnet build
  • 使用实际的 RIME 数据目录运行 PowerShell 模块
  • 验证会话生命周期、按键输入、候选词查询、Schema 切换和选项操作

备注

本 PR 仅包含 PowerShell 模块、解决方案集成,以及 PowerShell 模块所需的 RIME 绑定改动。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant