mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
feat: add hashline editing and TypeScript LSP
This commit is contained in:
@@ -21,13 +21,29 @@ test("search routing narrows files before requesting matching line numbers", ()
|
||||
assert.match(section, /Use read with offset\/limit only for the exact matching region/);
|
||||
});
|
||||
|
||||
test("ctx_execute_file routing warns about its project-root boundary", () => {
|
||||
const section = buildToolRoutingSection(["ctx_execute_file"]);
|
||||
test("context routing analyzes large files without a full read", () => {
|
||||
const section = buildToolRoutingSection(["ctx_execute", "ctx_execute_file"]);
|
||||
|
||||
assert.match(section, /Prefer ctx_execute_file over read when deriving an answer from a large file/);
|
||||
assert.match(section, /ctx_execute_file is confined to the current project root/);
|
||||
assert.match(section, /host permission approval does not bypass this Context Mode boundary/);
|
||||
});
|
||||
|
||||
test("hashline routing uses small reads and fresh anchors for edits", () => {
|
||||
const section = buildToolRoutingSection(["read", "edit"]);
|
||||
|
||||
assert.match(section, /smallest useful offset\/limit range/);
|
||||
assert.match(section, /obtain fresh LINE#HASH anchors with a small read/);
|
||||
assert.match(section, /Reuse fresh anchors returned by successful edits/);
|
||||
});
|
||||
|
||||
test("LSP routing covers navigation and post-edit diagnostics", () => {
|
||||
const section = buildToolRoutingSection(["lsp_definition", "lsp_references", "lsp_diagnostics"]);
|
||||
|
||||
assert.match(section, /Use LSP for symbol definitions, references/);
|
||||
assert.match(section, /post-edit diagnostics/);
|
||||
});
|
||||
|
||||
test("routing includes only guidance for active optional tools", () => {
|
||||
const section = buildToolRoutingSection(["read"]);
|
||||
|
||||
@@ -35,7 +51,8 @@ test("routing includes only guidance for active optional tools", () => {
|
||||
assert.doesNotMatch(section, /For literal search/);
|
||||
assert.doesNotMatch(section, /Use Context Mode/);
|
||||
assert.doesNotMatch(section, /ctx_execute_file is confined/);
|
||||
assert.match(section, /Use read directly/);
|
||||
assert.doesNotMatch(section, /fresh LINE#HASH anchors/);
|
||||
assert.match(section, /Use read only when exact source is needed/);
|
||||
});
|
||||
|
||||
test("routing is appended once", () => {
|
||||
|
||||
Reference in New Issue
Block a user