Skip to content

Commit 0ffebf9

Browse files
committed
Merge branch '18-featlsp-add-rename-symbol-support'
# Conflicts: # .please/memory/tasklist.json
2 parents 12ec597 + f236958 commit 0ffebf9

3 files changed

Lines changed: 163 additions & 24 deletions

File tree

.please/memory/tasklist.json

Lines changed: 139 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"session_id": "20251218-rename-symbol-lsp",
33
"feature_name": "Add Rename Symbol support to @pleaseai/code-lsp",
44
"created_at": "2025-12-18T10:00:00Z",
5-
"updated_at": "2025-12-18T10:00:00Z",
6-
"status": "in_progress",
7-
"current_phase": 6,
5+
"updated_at": "2025-12-18T07:43:59.732Z",
6+
"status": "completed",
7+
"current_phase": 8,
88
"issue_number": 18,
99
"branch": "18-featlsp-add-rename-symbol-support",
1010
"spec": {
@@ -20,31 +20,149 @@
2020
"validation_required": true
2121
},
2222
"ralph_config": {
23-
"enabled": true,
23+
"enabled": false,
2424
"max_iterations": 50,
2525
"completion_promise": "ALL_PHASE6_TASKS_COMPLETED",
2626
"current_iteration": 0,
2727
"started_at": "2025-12-18T10:50:00Z"
2828
},
2929
"phases": [
30-
{ "number": 1, "name": "Discovery", "status": "completed", "started_at": "2025-12-18T10:00:00Z", "completed_at": "2025-12-18T10:05:00Z" },
31-
{ "number": 2, "name": "Codebase Exploration", "status": "completed", "started_at": "2025-12-18T10:05:00Z", "completed_at": "2025-12-18T10:20:00Z" },
32-
{ "number": 3, "name": "Specification & Clarification", "status": "completed", "started_at": "2025-12-18T10:20:00Z", "completed_at": "2025-12-18T10:30:00Z" },
33-
{ "number": 4, "name": "Architecture Design", "status": "completed", "started_at": "2025-12-18T10:30:00Z", "completed_at": "2025-12-18T10:45:00Z" },
34-
{ "number": 5, "name": "GitHub Issue & PR", "status": "completed", "started_at": "2025-12-18T10:45:00Z", "completed_at": "2025-12-18T10:50:00Z" },
35-
{ "number": 6, "name": "Implementation", "status": "in_progress", "started_at": "2025-12-18T10:50:00Z" },
36-
{ "number": 7, "name": "Quality Review", "status": "pending" },
37-
{ "number": 8, "name": "PR Finalization", "status": "pending" }
30+
{
31+
"number": 1,
32+
"name": "Discovery",
33+
"status": "completed",
34+
"started_at": "2025-12-18T10:00:00Z",
35+
"completed_at": "2025-12-18T10:05:00Z"
36+
},
37+
{
38+
"number": 2,
39+
"name": "Codebase Exploration",
40+
"status": "completed",
41+
"started_at": "2025-12-18T10:05:00Z",
42+
"completed_at": "2025-12-18T10:20:00Z"
43+
},
44+
{
45+
"number": 3,
46+
"name": "Specification & Clarification",
47+
"status": "completed",
48+
"started_at": "2025-12-18T10:20:00Z",
49+
"completed_at": "2025-12-18T10:30:00Z"
50+
},
51+
{
52+
"number": 4,
53+
"name": "Architecture Design",
54+
"status": "completed",
55+
"started_at": "2025-12-18T10:30:00Z",
56+
"completed_at": "2025-12-18T10:45:00Z"
57+
},
58+
{
59+
"number": 5,
60+
"name": "GitHub Issue & PR",
61+
"status": "completed",
62+
"started_at": "2025-12-18T10:45:00Z",
63+
"completed_at": "2025-12-18T10:50:00Z"
64+
},
65+
{
66+
"number": 6,
67+
"name": "Implementation",
68+
"status": "completed",
69+
"started_at": "2025-12-18T10:50:00Z",
70+
"completed_at": "2025-12-18T11:30:00Z"
71+
},
72+
{
73+
"number": 7,
74+
"name": "Quality Review",
75+
"status": "completed",
76+
"started_at": "2025-12-18T11:30:00Z",
77+
"completed_at": "2025-12-18T11:45:00Z"
78+
},
79+
{
80+
"number": 8,
81+
"name": "PR Finalization",
82+
"status": "completed",
83+
"started_at": "2025-12-18T11:45:00Z",
84+
"completed_at": "2025-12-18T11:50:00Z"
85+
}
3886
],
3987
"tasks": [
40-
{ "id": "T001", "title": "Add type schemas (TextEdit, WorkspaceEdit, PrepareRenameResult)", "phase": 6, "status": "pending", "parallel": true, "dependencies": [] },
41-
{ "id": "T002", "title": "Add rename capability to client initialization", "phase": 6, "status": "pending", "parallel": true, "dependencies": [] },
42-
{ "id": "T003", "title": "Add normalization methods", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T001"] },
43-
{ "id": "T004", "title": "Add prepareRename() method", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T001", "T003"] },
44-
{ "id": "T005", "title": "Add rename() method", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T001", "T003"] },
45-
{ "id": "T006", "title": "Update CLAUDE.md documentation", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T004", "T005"] },
46-
{ "id": "T007", "title": "Add unit tests for normalization", "phase": 6, "status": "pending", "parallel": true, "dependencies": [] },
47-
{ "id": "T008", "title": "Add integration tests", "phase": 6, "status": "pending", "parallel": false, "dependencies": ["T004", "T005"] }
88+
{
89+
"id": "T001",
90+
"title": "Add type schemas (TextEdit, WorkspaceEdit, PrepareRenameResult)",
91+
"phase": 6,
92+
"status": "completed",
93+
"parallel": true,
94+
"dependencies": []
95+
},
96+
{
97+
"id": "T002",
98+
"title": "Add rename capability to client initialization",
99+
"phase": 6,
100+
"status": "completed",
101+
"parallel": true,
102+
"dependencies": []
103+
},
104+
{
105+
"id": "T003",
106+
"title": "Add normalization methods",
107+
"phase": 6,
108+
"status": "completed",
109+
"parallel": false,
110+
"dependencies": [
111+
"T001"
112+
]
113+
},
114+
{
115+
"id": "T004",
116+
"title": "Add prepareRename() method",
117+
"phase": 6,
118+
"status": "completed",
119+
"parallel": false,
120+
"dependencies": [
121+
"T001",
122+
"T003"
123+
]
124+
},
125+
{
126+
"id": "T005",
127+
"title": "Add rename() method",
128+
"phase": 6,
129+
"status": "completed",
130+
"parallel": false,
131+
"dependencies": [
132+
"T001",
133+
"T003"
134+
]
135+
},
136+
{
137+
"id": "T006",
138+
"title": "Update CLAUDE.md documentation",
139+
"phase": 6,
140+
"status": "completed",
141+
"parallel": false,
142+
"dependencies": [
143+
"T004",
144+
"T005"
145+
]
146+
},
147+
{
148+
"id": "T007",
149+
"title": "Add unit tests for normalization",
150+
"phase": 6,
151+
"status": "completed",
152+
"parallel": true,
153+
"dependencies": []
154+
},
155+
{
156+
"id": "T008",
157+
"title": "Add integration tests",
158+
"phase": 6,
159+
"status": "completed",
160+
"parallel": false,
161+
"dependencies": [
162+
"T004",
163+
"T005"
164+
]
165+
}
48166
],
49167
"checkpoints": []
50-
}
168+
}

docs/TODO.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@
2222

2323
### High Priority
2424

25-
#### 1. Rename Symbol
25+
#### 1. ~~Rename Symbol~~ ✅ Implemented
2626
- **LSP Methods**: `textDocument/rename`, `textDocument/prepareRename`
2727
- **Description**: Allows renaming symbols across the project
2828
- **Reference**: Serena `ls.py:1834-1859`
2929
- **Returns**: `WorkspaceEdit` with all changes needed
3030
- **Use Case**: Refactoring variable/function/class names safely
31+
- **Implementation**: PR #19 (merged)
3132

3233
#### 2. Code Actions
3334
- **LSP Methods**: `textDocument/codeAction`, `codeAction/resolve`
@@ -204,7 +205,7 @@ capabilities: {
204205

205206
| Priority | Feature | Effort | Value | Status |
206207
|----------|---------|--------|-------|--------|
207-
| **High** | Rename Symbol | Medium | High | ⬜ TODO |
208+
| **High** | Rename Symbol | Medium | High | ✅ Done |
208209
| **High** | Code Actions | Medium | High | ⬜ TODO |
209210
| **High** | File Close (`didClose`) | Low | Medium | ⬜ TODO |
210211
| **Medium** | Signature Help | Low | Medium | ⬜ TODO |

packages/lsp/README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ bun add @pleaseai/code-lsp
1515
- Code completions
1616
- Diagnostics and hover information
1717
- Symbol search (workspace and document)
18+
- Rename symbol across project
1819
- Auto-download for Kotlin, Dart, and Vue language servers
1920

2021
## Quick Start
@@ -52,6 +53,21 @@ const completions = await manager.completion({
5253
character: 5,
5354
})
5455

56+
// Prepare rename (validate rename is possible)
57+
const prepareResult = await manager.prepareRename({
58+
file: 'src/index.ts',
59+
line: 10,
60+
character: 5,
61+
})
62+
63+
// Rename symbol
64+
const workspaceEdit = await manager.rename({
65+
file: 'src/index.ts',
66+
line: 10,
67+
character: 5,
68+
newName: 'newSymbolName',
69+
})
70+
5571
// Cleanup
5672
await manager.shutdown()
5773
```
@@ -84,6 +100,8 @@ await manager.shutdown()
84100
| `completion({ file, line, character })` | Get code completions |
85101
| `workspaceSymbol(query)` | Search workspace symbols |
86102
| `documentSymbol(uri)` | Get document symbols |
103+
| `prepareRename({ file, line, character })` | Validate rename is possible at position |
104+
| `rename({ file, line, character, newName })` | Rename symbol, returns WorkspaceEdit |
87105
| `status()` | Get connected server status |
88106
| `shutdown()` | Close all clients |
89107

@@ -107,8 +125,10 @@ import {
107125
Range,
108126
// Symbols
109127
Symbol,
110-
111128
SymbolKind,
129+
130+
// Rename
131+
WorkspaceEdit,
112132
} from '@pleaseai/code-lsp'
113133
```
114134

0 commit comments

Comments
 (0)