mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-13 23:53:25 +00:00
feat: jtbd launch changes (#203)
* fix: use local host url when in dev * feat: show take survey to the users when rate limited * fix: update url
This commit is contained in:
@@ -69,7 +69,7 @@ export const JTBDAgentChat: FC<Props> = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex h-[500px] flex-col rounded-xl border border-border bg-card shadow-sm">
|
||||
<div className="flex h-[calc(100vh-250px)] flex-col rounded-xl border border-border bg-card shadow-sm">
|
||||
<div className="flex-1 space-y-4 overflow-y-auto p-4">
|
||||
{messages.map((msg) => (
|
||||
<MessageBubble key={msg.id} message={msg} />
|
||||
@@ -85,7 +85,7 @@ export const JTBDAgentChat: FC<Props> = ({
|
||||
onKeyDown={handleKeyDown}
|
||||
placeholder="Type your response..."
|
||||
disabled={isStreaming}
|
||||
className="min-h-[44px] resize-none"
|
||||
className="max-h-40 min-h-[44px] resize-none"
|
||||
rows={1}
|
||||
/>
|
||||
{isStreaming ? (
|
||||
|
||||
@@ -2,7 +2,8 @@ import { useRef, useState } from 'react'
|
||||
import { getBrowserOSAdapter } from '@/lib/browseros/adapter'
|
||||
import { BROWSEROS_PREFS } from '@/lib/browseros/prefs'
|
||||
|
||||
const JTBD_API_URL = 'https://jtbd-agent.fly.dev' // 'http://localhost:3001'
|
||||
const JTBD_API_URL = 'https://jtbd-agent.fly.dev'
|
||||
// const LOCAL_JTBD_API_URL = 'http://localhost:3001'
|
||||
const EXPERIMENT_ID = 'jtbd_jan26'
|
||||
|
||||
async function getInstallId(): Promise<string> {
|
||||
|
||||
@@ -49,15 +49,26 @@ export const ChatError: FC<ChatErrorProps> = ({ error, onRetry }) => {
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-center text-destructive text-xs">{text}</p>
|
||||
{url && (
|
||||
<a
|
||||
href={url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-muted-foreground text-xs underline hover:text-foreground"
|
||||
>
|
||||
Learn more
|
||||
</a>
|
||||
{isRateLimit && (
|
||||
<p className="text-muted-foreground text-xs">
|
||||
<a
|
||||
href={url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="underline hover:text-foreground"
|
||||
>
|
||||
Learn more
|
||||
</a>
|
||||
{' or '}
|
||||
<a
|
||||
href="/options.html?page=survey"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="underline hover:text-foreground"
|
||||
>
|
||||
take a quick survey
|
||||
</a>
|
||||
</p>
|
||||
)}
|
||||
{onRetry && (
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user