Standardize API parameters to camelCase and improve LSP client reliability

- Convert tool parameters from snake_case to camelCase for consistency
- Add file existence check in LSP client before opening files
- Fix version increment timing in LSP textDocument operations
- Optimize session token tracking using onStepFinish callback
- Add debugging logs for diagnostics troubleshooting

🤖 Generated with opencode
Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
Dax Raad
2025-05-26 22:08:50 -04:00
parent b840a40759
commit 2e938d9da1
7 changed files with 42 additions and 41 deletions

View File

@@ -44,7 +44,7 @@ export const view = Tool.define({
name: "view",
description: DESCRIPTION,
parameters: z.object({
file_path: z.string().describe("The path to the file to read"),
filePath: z.string().describe("The path to the file to read"),
offset: z
.number()
.describe("The line number to start reading from (0-based)")
@@ -55,7 +55,7 @@ export const view = Tool.define({
.optional(),
}),
async execute(params) {
let filePath = params.file_path;
let filePath = params.filePath;
if (!path.isAbsolute(filePath)) {
filePath = path.join(process.cwd(), filePath);
}