mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-26 11:34:50 +02:00
[eric] onboarding: fix Build starters opening in Agent mode (prefill-mode now wins the reset race) + quirky 4th prompt per category (minecraft, world record, fantasy quest, moon)
This commit is contained in:
@@ -143,12 +143,15 @@ const DashboardToolbar = React.forwardRef<HTMLDivElement, Props>(
|
||||
}
|
||||
prevInputOpen.current = inputOpen;
|
||||
}, [inputOpen, settingsLoaded, defaultMode, defaultModel, defaultThinkingLevel]);
|
||||
// A Build starter opens the composer in App Builder mode. Runs after the
|
||||
// reset above (declaration order) so it wins; cleared back to default when
|
||||
// prefillMode is gone (normal new chat).
|
||||
// Prefill-driven mode: a Build starter opens the composer in App Builder mode
|
||||
// ('view-builder'); a non-Build starter (no prefillMode) falls back to the
|
||||
// default. Gated on inputOpen + declared last so it wins the reset effects
|
||||
// above regardless of settings-load timing. A later manual pick survives
|
||||
// because none of these deps change on a pick.
|
||||
useEffect(() => {
|
||||
if (prefillMode) setMode(prefillMode);
|
||||
}, [prefillMode]);
|
||||
if (!inputOpen || !settingsLoaded) return;
|
||||
setMode(prefillMode || defaultMode || 'agent');
|
||||
}, [prefillMode, inputOpen, settingsLoaded, defaultMode]);
|
||||
|
||||
// Writes toolbar picks through to global default; otherwise the reopen-reset effect would snap back next open.
|
||||
const promoteToDefault = useCallback(<K extends keyof AppSettings>(key: K, value: AppSettings[K]) => {
|
||||
|
||||
@@ -26,7 +26,7 @@ const STARTER_CATEGORIES: StarterCategory[] = [
|
||||
'Find today\'s top news and summarize it for me',
|
||||
'Compare the 3 best standing desks and recommend one',
|
||||
'Plan a weekend trip to Tokyo with a day-by-day itinerary',
|
||||
'Find the highest-rated wireless earbuds under $100',
|
||||
'Find the strangest world record I could actually break',
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -35,7 +35,7 @@ const STARTER_CATEGORIES: StarterCategory[] = [
|
||||
'Build a focus timer that dings when the break starts',
|
||||
'Make a tip calculator that splits the bill',
|
||||
'Create a Snake game I can play right now',
|
||||
'Build a daily habit tracker with a streak counter',
|
||||
'Build a tiny Minecraft-style block world I can walk around in',
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -44,7 +44,7 @@ const STARTER_CATEGORIES: StarterCategory[] = [
|
||||
'Write a friendly email introducing myself to a new client',
|
||||
'Turn my rough notes into a polished update',
|
||||
'Write a product description for a coffee mug',
|
||||
'Write a short poem about the sea',
|
||||
'Write my morning routine as an epic fantasy quest',
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -53,7 +53,7 @@ const STARTER_CATEGORIES: StarterCategory[] = [
|
||||
'Explain how AI chatbots actually work, in plain English',
|
||||
'Teach me the basics of investing in 5 minutes',
|
||||
'Explain the stock market like I\'m five',
|
||||
'Give me a 5-minute crash course on climate change',
|
||||
'What would happen if the moon disappeared tomorrow?',
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user