Retire Convex paths and standardize local-first Pi runtime
This commit is contained in:
@@ -16,7 +16,8 @@ pub struct AiSession {
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub enum AiRuntimeOwner {
|
||||
RustWebHermes,
|
||||
/// mnote-web 上的 Pi Lab / agent-tools 运行时(历史名 RustWebHermes 已退役)。
|
||||
RustWebPi,
|
||||
CompatReactIsland,
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ pub struct DeleteBlock {
|
||||
/// 菜单项、快捷键、按钮的 enablement 通过 `when` 表达式对 context 求值得到。
|
||||
///
|
||||
/// 第一阶段支持 key 列表:
|
||||
/// - `workspace.sourceKind` — 工作区类型 ("local_folder" | "convex" | ...)
|
||||
/// - `workspace.sourceKind` — 工作区类型 ("local_folder")
|
||||
/// - `workspace.readonly` — bool,工作区是否只读
|
||||
/// - `tree.focusKind` — 当前聚焦的树类型 ("file_tree" | "page_tree" | "none")
|
||||
/// - `tree.selectionCount` — 当前选中行数 (i64)
|
||||
|
||||
@@ -53,7 +53,6 @@ pub enum KernelProjectionKind {
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum WorkspaceSourceKind {
|
||||
LocalFolder,
|
||||
ConvexWorkspace,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||
@@ -897,8 +896,8 @@ mod tests {
|
||||
#[test]
|
||||
fn workspace_source_serializes_minimal_command_source_contract() {
|
||||
let source = WorkspaceSource {
|
||||
source_kind: WorkspaceSourceKind::ConvexWorkspace,
|
||||
root_uri: "convex://workspace/ws_1".into(),
|
||||
source_kind: WorkspaceSourceKind::LocalFolder,
|
||||
root_uri: "file:///tmp/ws_1".into(),
|
||||
workspace_id: "ws_1".into(),
|
||||
capabilities: vec![
|
||||
WorkspaceSourceCapability::LoadSnapshot,
|
||||
@@ -908,8 +907,8 @@ mod tests {
|
||||
};
|
||||
|
||||
let value = serde_json::to_value(&source).expect("workspace source 应可序列化");
|
||||
assert_eq!(value["sourceKind"], json!("convex_workspace"));
|
||||
assert_eq!(value["rootUri"], json!("convex://workspace/ws_1"));
|
||||
assert_eq!(value["sourceKind"], json!("local_folder"));
|
||||
assert_eq!(value["rootUri"], json!("file:///tmp/ws_1"));
|
||||
assert_eq!(value["workspaceId"], json!("ws_1"));
|
||||
assert_eq!(
|
||||
value["capabilities"],
|
||||
@@ -1026,8 +1025,8 @@ mod tests {
|
||||
}
|
||||
let value = serde_json::json!({
|
||||
"workspaceId": "ws_1",
|
||||
"sourceKind": "convex_workspace",
|
||||
"rootUri": "convex://ws",
|
||||
"sourceKind": "local_folder",
|
||||
"rootUri": "file:///tmp/ws",
|
||||
"relativePath": "doc.md",
|
||||
"objectIdentity": {
|
||||
"objectKind": "page",
|
||||
|
||||
Reference in New Issue
Block a user