feat: antropic model added fix & kb tooling fixes

- Updated main-agent middleware to clarify that both filesystem reads/writes and knowledge-base retrieval are handled by the `knowledge_base` subagent.
- Introduced `_forward_mention_pins` function to carry `@`-mention pins into subagent state.
- Revised system prompts to reflect the new retrieval method and ensure proper citation handling.
- Removed the `search_knowledge_base` tool and its related tests, consolidating functionality under the `task` tool.
- Enhanced documentation to guide usage of the new retrieval approach and citation practices.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-06-25 20:19:44 -07:00
parent b4af67f77d
commit 9642d7ced0
36 changed files with 581 additions and 168 deletions

View file

@ -53,9 +53,7 @@ async def resolve_connector_references(
)
accessible = {row.id: row for row in rows.all()}
chip_by_id = {
chip.id: chip for chip in (chips or []) if chip.kind == "connector"
}
chip_by_id = {chip.id: chip for chip in (chips or []) if chip.kind == "connector"}
references: list[ConnectorReference] = []
for connector_id in dict.fromkeys(connector_ids):

View file

@ -8,11 +8,11 @@ a class-level discriminator used by the renderer and scope builder.
from __future__ import annotations
from dataclasses import dataclass
from enum import Enum
from enum import StrEnum
from typing import ClassVar
class ReferenceKind(str, Enum):
class ReferenceKind(StrEnum):
"""What the user pointed at; the value is the label shown to the model."""
DOCUMENT = "document"

View file

@ -33,9 +33,7 @@ def render_reference_pointers(references: list[Reference]) -> str | None:
lines = [_render_pointer(reference) for reference in references]
return (
"<referenced_this_turn>\n"
f"{_HEADER}\n"
+ "\n".join(lines)
+ "\n</referenced_this_turn>"
f"{_HEADER}\n" + "\n".join(lines) + "\n</referenced_this_turn>"
)