An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
style: format code with Prettier
Yoshiki Miura27b649c4ea52
diff --git a/scripts/README.md b/scripts/README.mdindex 81f1f015..e6dd7844 100644--- a/scripts/README.md+++ b/scripts/README.md@@ -92,11 +92,12 @@ The script displays:### Advanced Usage#### Message Regeneration+You can regenerate the last assistant message in a conversation:```bash# First, send a message and note the chat ID and message ID from the output-bun chat -m "Tell me about AI"+bun chat -m "Tell me about AI"# Then regenerate the assistant's responsebun chat -c "chat_123" -t regenerate --message-id "msg_456"@@ -121,6 +122,7 @@ bun chat -c "chat_123" -t regenerate --message-id "msg_456" -m "Tell me about ma### Troubleshooting#### Authentication Errors+If you encounter "User not authenticated" errors:1. Ensure you're logged into Morphic in your browser@@ -129,6 +131,7 @@ If you encounter "User not authenticated" errors:4. Cookies expire after ~1 hour, so refresh them if needed#### API Errors+If you encounter "Selected provider is not enabled" errors:1. Check that the model type is correctly configured in your systemdiff --git a/scripts/chat-cli.ts b/scripts/chat-cli.tsindex 1e3fd4ee..efd67065 100755--- a/scripts/chat-cli.ts+++ b/scripts/chat-cli.ts@@ -173,12 +173,14 @@ class ChatApiTester {cookieString += `; modelType=${this.config.modelType}`}if (!cookieString.includes('searchMode=')) {- const searchModeValue = this.config.searchMode === false ? 'disabled' : this.config.searchMode+ const searchModeValue =+ this.config.searchMode === false ? 'disabled' : this.config.searchModecookieString += `; searchMode=${searchModeValue}`}} else {// If no cookies from env, just use our settings- const searchModeValue = this.config.searchMode === false ? 'disabled' : this.config.searchMode+ const searchModeValue =+ this.config.searchMode === false ? 'disabled' : this.config.searchModecookieString = [`modelType=${this.config.modelType}`,`searchMode=${searchModeValue}`@@ -337,7 +339,9 @@ function parseArgs(): Partial<ChatApiConfig> {if (['quick', 'planning', 'adaptive'].includes(searchMode)) {config.searchMode = searchMode as 'quick' | 'planning' | 'adaptive'} else {- console.error('❌ Invalid search mode. Use: quick, planning, or adaptive')+ console.error(+ '❌ Invalid search mode. Use: quick, planning, or adaptive'+ )process.exit(1)}break@@ -353,10 +357,7 @@ function parseArgs(): Partial<ChatApiConfig> {case '-t':case '--trigger':const trigger = args[++i]- if (- trigger === 'regenerate' ||- trigger === 'regenerate-message'- ) {+ if (trigger === 'regenerate' || trigger === 'regenerate-message') {config.trigger = 'regenerate-message'} else {config.trigger = 'submit-message'