Skip to content

Commit 069ac2c

Browse files
committed
Add welcome message to builder
1 parent 583e731 commit 069ac2c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

llmstack/client/src/components/sheets/SheetBuilder.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ function SheetBuilder({ sheetId, open, addOrUpdateColumns, addOrUpdateCells }) {
1717
}/ws`;
1818
const [suggestedMessages, setSuggestedMessages] = useState([]);
1919

20+
const welcomeMessage = {
21+
role: "assistant",
22+
content:
23+
"👋 Welcome to the Sheet Builder! I'm here to help you create and modify your sheet. 🚀\n\nYou can ask me to create new columns, update existing ones, or add data to your sheet. For example, you could say:\n\n- 📊 Create a new column for employee names\n- 💰 Add a column for calculating total sales\n- 🔄 Update the 'Status' column to use a formula\n\nHow can I assist you with your sheet today? 😊",
24+
};
25+
26+
useEffect(() => {
27+
if (open && messages.length === 0) {
28+
setMessages([welcomeMessage]);
29+
}
30+
}, [open, messages.length]);
31+
2032
const handleBuilderUpdates = useCallback(
2133
(updates) => {
2234
for (const update of updates) {

0 commit comments

Comments
 (0)