mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-28 21:49:40 +02:00
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:
parent
b4af67f77d
commit
9642d7ced0
36 changed files with 581 additions and 168 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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>"
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue