mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Add information about the user to the system prompt
This commit is contained in:
2 files changed
+35
-4
No files matched your search
@@ -80,7 +80,7 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
|
||||
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
const { fs: browserFS } = useFS();
|
||||
const { user } = useCurrentUser();
|
||||
const { user, metadata } = useCurrentUser();
|
||||
const { models } = useProviderModels();
|
||||
|
||||
// Initialize AI chat with tools
|
||||
@@ -152,8 +152,10 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
|
||||
name: "Shakespeare",
|
||||
profession: "software extraordinaire",
|
||||
tools: Object.values(tools),
|
||||
user,
|
||||
metadata,
|
||||
}).then(setSystemPrompt)
|
||||
}, [browserFS, cwd, tools]);
|
||||
}, [browserFS, cwd, tools, user, metadata]);
|
||||
|
||||
const {
|
||||
messages,
|
||||
|
||||
Reference in new issue
Block a user