Skip to content

feat: LSP 能力暴露 — 代码智能节点支持 #23

Closed

Description

@dahai80

需求来源

fusion-cowork V1.0 希望在工作流和协作空间中集成代码智能能力(如 go to definition、find references 等)。

需求描述

将 fusion-code 的 LSP 能力通过 REST API 暴露,供 fusion-cowork 作为工作流节点调用。

期望接口

POST /api/lsp/operation
Content-Type: application/json

{
  "operation": "goToDefinition | findReferences | hover | documentSymbol | workspaceSymbol",
  "file_path": "string",
  "line": int,
  "character": int,
  "query": "string"           // workspaceSymbol 时需要
}

Response 200:
{
  "operation": "string",
  "results": [
    {
      "file_path": "string",
      "line": int,
      "character": int,
      "text": "string",
      "kind": "string"
    }
  ]
}

使用场景

  1. 工作流中 "代码审查" 节点自动查找定义和引用
  2. 协作空间 Agent 分析代码时使用 LSP 能力
  3. 自动化代码重构工作流

优先级

P2 — V1.0+ 增强

关联

  • fusion-cowork 增强方案: ~/fusion/architecture/fusion-cowork-enhance.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions