Conversation
Reviewer's GuideRenames the Rust code analysis service and its integration throughout the Go agent from Sequence diagram for Codexray startup and semantic searchsequenceDiagram
actor User
participant Main as main.go
participant CodexrayProc as codeactor-codexray
participant CodexraySrv as CodeXRayServer
participant App as CodeActor.Init
participant RepoTool as RepoOperationsTool
User->>Main: runTUI()/runHTTP
Main->>Main: findAvailablePort
Main->>CodexrayProc: startCodexrayServer
CodexrayProc->>CodexraySrv: start
Main->>CodexraySrv: GET /health
CodexraySrv-->>Main: ApiResponse
Main->>App: Init
App->>App: set CodexrayPort
App->>App: set GlobalCtx.CodexrayURL
App->>RepoTool: NewRepoOperationsTool(CodexrayURL, ProjectPath)
User->>RepoTool: ExecuteSemanticSearch
RepoTool->>RepoTool: doCodexrayRequest("/semantic_search", body)
RepoTool->>CodexraySrv: POST /semantic_search
CodexraySrv-->>RepoTool: SemanticSearchResponse
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues, and left some high level feedback:
- Renaming the Rust config section from
[codebase]to[codexray]without backward-compatible aliases will break existingconfig.tomlfiles; consider adding#[serde(alias = "codebase")]on thecodexrayfield (and nested structs) or an explicit migration path so older configs still deserialize. - Similarly, changing API endpoints (e.g.
/codebase_init→/codexray_init) and env vars (CODEBASE_PORT→CODEXRAY_PORT) is a breaking change for existing clients; it may be worth keeping the old names as deprecated aliases on the server side to maintain compatibility during the transition. - Some log and error messages still reference "Codebase" (e.g. the health-wait failure log in
main.go), while others now say "Codexray"; it would be good to sweep for inconsistent naming to avoid confusion when debugging.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Renaming the Rust config section from `[codebase]` to `[codexray]` without backward-compatible aliases will break existing `config.toml` files; consider adding `#[serde(alias = "codebase")]` on the `codexray` field (and nested structs) or an explicit migration path so older configs still deserialize.
- Similarly, changing API endpoints (e.g. `/codebase_init` → `/codexray_init`) and env vars (`CODEBASE_PORT` → `CODEXRAY_PORT`) is a breaking change for existing clients; it may be worth keeping the old names as deprecated aliases on the server side to maintain compatibility during the transition.
- Some log and error messages still reference "Codebase" (e.g. the health-wait failure log in `main.go`), while others now say "Codexray"; it would be good to sweep for inconsistent naming to avoid confusion when debugging.
## Individual Comments
### Comment 1
<location path="internal/app/app.go" line_range="36" />
<code_context>
globalCtx *globalctx.GlobalCtx
DisabledAgents string // comma-separated list of agent names to disable (e.g. "repo,coding,chat")
- CodebasePort int // codebase 服务端口,由 main 函数动态分配
+ CodexrayPort int // codebase 服务端口,由 main 函数动态分配
SkillRegistry *skills.SkillRegistry // 技能注册表,加载 .codeactor/skills/ 下的 .md 文件
</code_context>
<issue_to_address>
**nitpick (typo):** Field comment still refers to 'codebase' while the field and service have been renamed to 'Codexray'.
The inline comment for `CodexrayPort` still mentions `codebase 服务端口`. Please update it to reference `Codexray` or use a neutral description (e.g., "embedding service port") to keep terminology consistent.
```suggestion
CodexrayPort int // Codexray 服务端口,由 main 函数动态分配
```
</issue_to_address>
### Comment 2
<location path="CLAUDE.md" line_range="42" />
<code_context>
- **LLM**: `github.com/openai/openai-go/v3` (multi-provider: OpenAI-compatible, Bedrock)
- **HTTP/WS**: `gin-gonic/gin` + `olahol/melody`
- **TUI**: Bubble Tea
-- **External**: `codeactor-codebase` (Rust, `127.0.0.1:12800`) — semantic search, repo investigation, call graph, code skeleton/snippet. See [Codebase Component](#codebase-component) below.
+- **External**: `codeactor-codexray` (Rust, `127.0.0.1:12800`) — semantic search, repo investigation, call graph, code skeleton/snippet. See [Codexray Component](#codexray-component) below.
- **System deps**: `ripgrep` (rg), `fzf`
</code_context>
<issue_to_address>
**suggestion (typo):** Consider standardizing the component name capitalization (e.g., `CodeXRay Component`) for consistency.
Elsewhere in the docs this is `CodeXRay`/`CodeXRay Server`, but here the link text and heading use `Codexray`. Please align this heading and link text with the canonical name (e.g. `CodeXRay Component` and `#codexray-component`).
Suggested implementation:
```
- **External**: `codeactor-codexray` (Rust, `127.0.0.1:12800`) — semantic search, repo investigation, call graph, code skeleton/snippet. See [CodeXRay Component](#codexray-component) below.
```
To fully align capitalization and anchors:
1. Update the corresponding section heading from `## Codexray Component` (or similar) to `## CodeXRay Component`. On GitHub, this will still generate the `#codexray-component` anchor.
2. Search the rest of `CLAUDE.md` for `Codexray` and update occurrences to the canonical `CodeXRay` / `CodeXRay Server` naming as appropriate, ensuring any manual anchors or references remain consistent (e.g. `#codexray-component`).
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| globalCtx *globalctx.GlobalCtx | ||
| DisabledAgents string // comma-separated list of agent names to disable (e.g. "repo,coding,chat") | ||
| CodebasePort int // codebase 服务端口,由 main 函数动态分配 | ||
| CodexrayPort int // codebase 服务端口,由 main 函数动态分配 |
There was a problem hiding this comment.
nitpick (typo): Field comment still refers to 'codebase' while the field and service have been renamed to 'Codexray'.
The inline comment for CodexrayPort still mentions codebase 服务端口. Please update it to reference Codexray or use a neutral description (e.g., "embedding service port") to keep terminology consistent.
| CodexrayPort int // codebase 服务端口,由 main 函数动态分配 | |
| CodexrayPort int // Codexray 服务端口,由 main 函数动态分配 |
| - **LLM**: `github.com/openai/openai-go/v3` (multi-provider: OpenAI-compatible, Bedrock) | ||
| - **HTTP/WS**: `gin-gonic/gin` + `olahol/melody` | ||
| - **TUI**: Bubble Tea | ||
| - **External**: `codeactor-codebase` (Rust, `127.0.0.1:12800`) — semantic search, repo investigation, call graph, code skeleton/snippet. See [Codebase Component](#codebase-component) below. |
There was a problem hiding this comment.
suggestion (typo): Consider standardizing the component name capitalization (e.g., CodeXRay Component) for consistency.
Elsewhere in the docs this is CodeXRay/CodeXRay Server, but here the link text and heading use Codexray. Please align this heading and link text with the canonical name (e.g. CodeXRay Component and #codexray-component).
Suggested implementation:
- **External**: `codeactor-codexray` (Rust, `127.0.0.1:12800`) — semantic search, repo investigation, call graph, code skeleton/snippet. See [CodeXRay Component](#codexray-component) below.
To fully align capitalization and anchors:
- Update the corresponding section heading from
## Codexray Component(or similar) to## CodeXRay Component. On GitHub, this will still generate the#codexray-componentanchor. - Search the rest of
CLAUDE.mdforCodexrayand update occurrences to the canonicalCodeXRay/CodeXRay Servernaming as appropriate, ensuring any manual anchors or references remain consistent (e.g.#codexray-component).
Summary by Sourcery
Rename the Rust code analysis service and its integration from CodeBase/codebase to CodeXRay/codexray across the project, updating configs, endpoints, tooling, and documentation to match the new naming.
Enhancements:
Build:
Documentation:
Tests: