- Hi! I'm Miro. Ask me anything about Amr's experience, projects,
- or skills 🙂
+
+
+ Hi! I'm Miro. Ask me anything about Amr's
+ experience, projects, or skills 🙂
+
+
+ {suggestedQuestions.map((q) => (
+
+ ))}
+
)}
{messages.map((m, index) => (
diff --git a/src/components/chat/use-chat-widget.ts b/src/components/chat/use-chat-widget.ts
index cf4b1a1..fa928bc 100644
--- a/src/components/chat/use-chat-widget.ts
+++ b/src/components/chat/use-chat-widget.ts
@@ -109,6 +109,18 @@ export function useChatWidget() {
[input, isLoading, sendMessage],
);
+ const handleSuggestedQuestion = useCallback(
+ async (question: string) => {
+ if (isLoading) return;
+ try {
+ await sendMessage({ text: question });
+ } catch (err) {
+ console.error("Failed to send suggested question:", err);
+ }
+ },
+ [isLoading, sendMessage],
+ );
+
const isRateLimited =
error?.message?.includes("429") ||
(error as unknown as { status?: number })?.status === 429;
@@ -143,6 +155,7 @@ export function useChatWidget() {
copiedId,
copyToClipboard,
handleEdit,
+ handleSuggestedQuestion,
isFilterBarVisible,
status,
};
From 9d32e03635214c4b73024b17ca0e7eefd8eae007 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Tue, 7 Jul 2026 04:56:26 +0000
Subject: [PATCH 2/3] feat: add suggested questions to chat widget empty state
- Provide guidance for users in the AI assistant empty state
- Add interactive chips for common questions
- Implement handleSuggestedQuestion helper in chat hook
- Fix TypeScript error by using valid Button variant ("ghost")
- Document UX pattern in .jules/palette.md
- Ensure keyboard accessibility and proper ARIA labels
---
src/components/chat/client.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/chat/client.tsx b/src/components/chat/client.tsx
index 61a9852..8f3e37c 100644
--- a/src/components/chat/client.tsx
+++ b/src/components/chat/client.tsx
@@ -75,7 +75,7 @@ export default function ChatWidgetClient() {