Skip to content

Commit dd8db47

Browse files
committed
fix: fixing tanchat example
1 parent 21d3a70 commit dd8db47

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

frameworks/react-cra/examples/tanchat/assets/src/routes/demo/api.tanchat.ts.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const Route = createFileRoute('/api/demo-chat')({
3232
const tools = await getTools()
3333

3434
const result = await streamText({
35-
model: anthropic('<% if (addOnEnabled['netlify']) { %>claude-sonnet-4-5-20250929<% } else { %>claude-3-5-sonnet-latest<% } %>'),
35+
model: anthropic('<% if (addOnEnabled['netlify']) { %>claude-sonnet-4-5-20250929<% } else { %>claude-haiku-4-5<% } %>'),
3636
messages: convertToModelMessages(messages),
3737
temperature: 0.7,
3838
stopWhen: stepCountIs(5),

frameworks/react-cra/examples/tanchat/assets/src/routes/demo/tanchat.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function InitalLayout({ children }: { children: React.ReactNode }) {
3434

3535
function ChattingLayout({ children }: { children: React.ReactNode }) {
3636
return (
37-
<div className="absolute bottom-0 right-0 left-64 bg-gray-900/80 backdrop-blur-sm border-t border-orange-500/10">
37+
<div className="sticky bottom-0 left-0 right-0 bg-gray-900/80 backdrop-blur-sm border-t border-orange-500/10 z-10">
3838
<div className="max-w-3xl mx-auto w-full px-4 py-3">{children}</div>
3939
</div>
4040
)
@@ -55,7 +55,10 @@ function Messages({ messages }: { messages: Array<UIMessage> }) {
5555
}
5656

5757
return (
58-
<div ref={messagesContainerRef} className="flex-1 overflow-y-auto pb-24">
58+
<div
59+
ref={messagesContainerRef}
60+
className="flex-1 overflow-y-auto pb-4 min-h-0"
61+
>
5962
<div className="max-w-3xl mx-auto w-full px-4">
6063
{messages.map(({ id, role, parts }) => (
6164
<div
@@ -131,8 +134,8 @@ function ChatPage() {
131134
const Layout = messages.length ? ChattingLayout : InitalLayout
132135

133136
return (
134-
<div className="relative flex h-[calc(100vh-32px)] bg-gray-900">
135-
<div className="flex-1 flex flex-col">
137+
<div className="relative flex h-[calc(100vh-80px)] bg-gray-900">
138+
<div className="flex-1 flex flex-col min-h-0">
136139
<Messages messages={messages} />
137140

138141
<Layout>
@@ -180,6 +183,6 @@ function ChatPage() {
180183
)
181184
}
182185

183-
export const Route = createFileRoute('/example/chat')({
186+
export const Route = createFileRoute('/demo/tanchat')({
184187
component: ChatPage,
185188
})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This file is auto-generated. Do not edit manually.
22
// Generated from add-ons, examples, hosts, project, and toolchains directories
3-
export const contentChecksum = '2b3e74e22202e202e179f9a6a55cec0b4a0cbdcf70c6debf7a900f3405cbfad7'
3+
export const contentChecksum = 'a42905c8800e56f1a97cdfc380ba4543e2d296e1fde95246036a4eacdaa694d7'

packages/cta-engine/src/create-app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Use the following commands to start your app:
251251
getPackageManagerScriptCommand(options.packageManager, ['dev']),
252252
)}
253253
254-
Please read the README.md for information on testing, styling, adding routes, etc.${errorStatement}`,
254+
Please check the README.md for information on testing, styling, adding routes, etc.${errorStatement}`,
255255
)
256256
}
257257

0 commit comments

Comments
 (0)