feat(assistant): Improve screen context processing with model selection

This commit is contained in:
cogwheel0
2025-11-21 21:12:39 +05:30
parent 9d47c8a964
commit 1a6ec3f9ad
2 changed files with 31 additions and 5 deletions

View File

@@ -315,12 +315,10 @@ class _ChatPageState extends ConsumerState<ChatPage> {
// Clear the context so we don't process it again
WidgetsBinding.instance.addPostFrameCallback((_) {
ref.read(screenContextProvider.notifier).setContext(null);
// Pre-fill the input or send a message
// For now, let's just pre-fill the input with a prompt
// TODO: Ideally we should add this as a system message or attachment
final currentModel = ref.read(selectedModelProvider);
_handleMessageSend(
"Here is the content of my screen:\n\n$screenContext\n\nCan you summarize this?",
null,
currentModel,
);
});
}