refactor: remove search_surfsense_docs tool and related references

- Deleted the `search_surfsense_docs` tool and its associated files, streamlining the agent's toolset.
- Updated various components and prompts to remove references to the now-removed tool, ensuring consistency across the codebase.
- Adjusted documentation to direct users to the SurfSense documentation link for product-related queries instead.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-05-28 22:35:14 -07:00
parent 9b9e6828c7
commit 40ca9e6ed2
71 changed files with 232 additions and 1676 deletions

View file

@ -1,6 +1,5 @@
import { IconUsersGroup } from "@tabler/icons-react";
import {
BookOpen,
Brain,
File,
FileText,
@ -119,8 +118,6 @@ export const getConnectorIcon = (connectorType: EnumConnectorName | string, clas
return <FileText {...iconProps} />;
case "EXTENSION":
return <Webhook {...iconProps} />;
case "SURFSENSE_DOCS":
return <BookOpen {...iconProps} />;
case "USER_MEMORY":
case "TEAM_MEMORY":
return <Brain {...iconProps} />;

View file

@ -1,5 +1,4 @@
import {
BookOpen,
Brain,
Calendar,
FileEdit,
@ -47,7 +46,6 @@ const TOOL_ICONS: Record<string, LucideIcon> = {
// Web / search
scrape_webpage: ScanLine,
web_search: Globe,
search_surfsense_docs: BookOpen,
// Automations
create_automation: Workflow,
// Memory
@ -152,7 +150,6 @@ const TOOL_DISPLAY_NAMES: Record<string, string> = {
// Web / search
scrape_webpage: "Read webpage",
web_search: "Search the web",
search_surfsense_docs: "Search knowledge base",
// Automations
create_automation: "Create automation",
// Memory

View file

@ -27,7 +27,6 @@ export const documentTypeEnum = z.enum([
"CIRCLEBACK",
"OBSIDIAN_CONNECTOR",
"LOCAL_FOLDER_FILE",
"SURFSENSE_DOCS",
"NOTE",
"USER_MEMORY",
"TEAM_MEMORY",
@ -77,27 +76,6 @@ export const documentWithChunks = document.extend({
chunk_start_index: z.number().optional().default(0),
});
/**
* Surfsense documentation schemas
* Follows the same pattern as document/documentWithChunks
*/
export const surfsenseDocsChunk = z.object({
id: z.number(),
content: z.string(),
});
export const surfsenseDocsDocument = z.object({
id: z.number(),
title: z.string(),
source: z.string(),
public_url: z.string(),
content: z.string(),
});
export const surfsenseDocsDocumentWithChunks = surfsenseDocsDocument.extend({
chunks: z.array(surfsenseDocsChunk),
});
/**
* Get documents
*/
@ -284,32 +262,6 @@ export const getDocumentChunksResponse = z.object({
has_more: z.boolean(),
});
/**
* Get Surfsense docs by chunk
*/
export const getSurfsenseDocsByChunkRequest = z.object({
chunk_id: z.number(),
});
export const getSurfsenseDocsByChunkResponse = surfsenseDocsDocumentWithChunks;
/**
* List Surfsense docs
*/
export const getSurfsenseDocsRequest = z.object({
queryParams: paginationQueryParams.extend({
title: z.string().optional(),
}),
});
export const getSurfsenseDocsResponse = z.object({
items: z.array(surfsenseDocsDocument),
total: z.number(),
page: z.number(),
page_size: z.number(),
has_more: z.boolean(),
});
/**
* Update document
*/
@ -358,13 +310,6 @@ export type DeleteDocumentResponse = z.infer<typeof deleteDocumentResponse>;
export type DocumentTypeEnum = z.infer<typeof documentTypeEnum>;
export type DocumentSortBy = z.infer<typeof documentSortByEnum>;
export type SortOrder = z.infer<typeof sortOrderEnum>;
export type SurfsenseDocsChunk = z.infer<typeof surfsenseDocsChunk>;
export type SurfsenseDocsDocument = z.infer<typeof surfsenseDocsDocument>;
export type SurfsenseDocsDocumentWithChunks = z.infer<typeof surfsenseDocsDocumentWithChunks>;
export type GetSurfsenseDocsByChunkRequest = z.infer<typeof getSurfsenseDocsByChunkRequest>;
export type GetSurfsenseDocsByChunkResponse = z.infer<typeof getSurfsenseDocsByChunkResponse>;
export type GetSurfsenseDocsRequest = z.infer<typeof getSurfsenseDocsRequest>;
export type GetSurfsenseDocsResponse = z.infer<typeof getSurfsenseDocsResponse>;
export type GetDocumentChunksRequest = z.infer<typeof getDocumentChunksRequest>;
export type GetDocumentChunksResponse = z.infer<typeof getDocumentChunksResponse>;
export type ChunkRead = z.infer<typeof chunkRead>;