mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
refactor(acp): migrate to @agentclientprotocol/sdk and clean up handlers
- Replace deprecated ACP session manager with new SDK integration - Add acpFileHandler test coverage - Remove obsolete acpMessageHandler and acpSessionManager - Update type definitions and connection handlers - Apply code formatting fixes Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
180dcd8b36
commit
c044d4dba1
28 changed files with 959 additions and 1959 deletions
|
|
@ -48,10 +48,11 @@ export class AcpFileHandler {
|
|||
`[ACP] Successfully read file: ${params.path} (${content.length} bytes)`,
|
||||
);
|
||||
|
||||
// Handle line offset and limit
|
||||
// Handle line offset and limit.
|
||||
// ACP spec: `line` is 1-based (first line = 1).
|
||||
if (params.line !== null || params.limit !== null) {
|
||||
const lines = content.split('\n');
|
||||
const startLine = params.line || 0;
|
||||
const startLine = Math.max(0, (params.line ?? 1) - 1);
|
||||
const endLine = params.limit ? startLine + params.limit : lines.length;
|
||||
const selectedLines = lines.slice(startLine, endLine);
|
||||
const result = { content: selectedLines.join('\n') };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue