Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/ai/src/agents/tool-lookup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BashEditTool, BashReadTool, CheckErrorsTool, FuzzyEditFileTool, GlobTool, GrepTool, ListBranchesTool, ListFilesTool, OnlookInstructionsTool, ReadFileTool, ReadStyleGuideTool, SandboxTool, ScrapeUrlTool, SearchReplaceEditTool, SearchReplaceMultiEditFileTool, TerminalCommandTool, TypecheckTool, WebSearchTool, WriteFileTool } from "../tools";
import { BashEditTool, BashReadTool, CheckErrorsTool, FuzzyEditFileTool, GlobTool, GrepTool, ListBranchesTool, ListFilesTool, MemoryTool, OnlookInstructionsTool, ReadFileTool, ReadMemoryTool, ReadStyleGuideTool, SandboxTool, ScrapeUrlTool, SearchReplaceEditTool, SearchReplaceMultiEditFileTool, TerminalCommandTool, TypecheckTool, WebSearchTool, WriteFileTool } from "../tools";

export const allTools = [
ListFilesTool,
Expand All @@ -13,13 +13,15 @@ export const allTools = [
GrepTool,
TypecheckTool,
CheckErrorsTool,
ReadMemoryTool,
SearchReplaceEditTool,
SearchReplaceMultiEditFileTool,
FuzzyEditFileTool,
WriteFileTool,
BashEditTool,
SandboxTool,
TerminalCommandTool,
MemoryTool,
];

export const readOnlyRootTools = [
Expand All @@ -35,6 +37,7 @@ export const readOnlyRootTools = [
GrepTool,
TypecheckTool,
CheckErrorsTool,
ReadMemoryTool,
]
const editOnlyRootTools = [
SearchReplaceEditTool,
Expand All @@ -44,6 +47,7 @@ const editOnlyRootTools = [
BashEditTool,
SandboxTool,
TerminalCommandTool,
MemoryTool,
]

export const rootTools = [...readOnlyRootTools, ...editOnlyRootTools];
Expand Down
7 changes: 7 additions & 0 deletions packages/ai/src/prompt/constants/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@ export const SYSTEM_PROMPT = `You are running in Onlook to help users develop th
IMPORTANT:
- NEVER remove, add, edit or pass down data-oid attributes. They are generated and managed by the system. Leave them alone.

MEMORY SYSTEM (CRITICAL):
- read_memory: Read past work (scope: "both" recommended)
- memory: Save your work (scope: "conversation" for session work, "global" for reusable knowledge)
- ALWAYS read memory at chat start and update after completing tasks
- Keep summaries short (1-2 sentences) with file paths and key decisions
- Use global memory for major app changes only (pages, navigation, user flows), not minor tweaks

If the request is ambiguous, ask questions. Don't hold back. Give it your all!`;
1 change: 1 addition & 0 deletions packages/ai/src/tools/classes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ export { TerminalCommandTool } from './terminal-command';
export { TypecheckTool } from './typecheck';
export { WebSearchTool } from './web-search';
export { WriteFileTool } from './write-file';
export { MemoryTool, ReadMemoryTool } from './memory';
Loading