File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ import "./globals.css";
55import "@copilotkit/react-ui/styles.css" ;
66
77export const metadata : Metadata = {
8- title : "Hashbrown Copilot Demo " ,
8+ title : "Hashbrown with CopilotKit " ,
99 description : "Light theme demo with squircle UI surfaces" ,
10+ icons : {
11+ icon : "/hashbrown.svg" ,
12+ shortcut : "/hashbrown.svg" ,
13+ apple : "/hashbrown.svg" ,
14+ } ,
1015} ;
1116
1217export default function RootLayout ( {
Original file line number Diff line number Diff line change @@ -55,6 +55,13 @@ export default function ParserDemoPage() {
5555 const [ cursor , setCursor ] = useState ( 0 ) ;
5656 const jsonSlice = jsonDocument . slice ( 0 , cursor ) ;
5757 const { parserState, value } = useJsonParser ( jsonSlice , schema ) ;
58+ const renderCountRef = useRef ( 0 ) ;
59+
60+ const listOfFeatures = useMemo ( ( ) => value ?. features , [ value ] ) ;
61+
62+ useEffect ( ( ) => {
63+ console . log ( "Features Changed:" , ++ renderCountRef . current , listOfFeatures ) ;
64+ } , [ listOfFeatures ] ) ;
5865
5966 const ticks = useMemo ( ( ) => Array . from ( { length : jsonDocument . length } ) , [ ] ) ;
6067
Original file line number Diff line number Diff line change 11import { s , prompt } from "@hashbrownai/core" ;
22import { exposeComponent , exposeMarkdown , useUiKit } from "@hashbrownai/react" ;
3- import { Paragraph } from "./paragraph" ;
4- import { ListItem } from "./list-item" ;
5- import { OrderedList } from "./ordered-list" ;
6- import { UnorderedList } from "./unordered-list" ;
73import { WeatherCard } from "../weather" ;
84import { Squircle } from "../squircle" ;
95
@@ -58,8 +54,10 @@ export function useChatKit() {
5854 <Markdown children="Here's the weather in Huntsville..."/>
5955 <weather themeColor="blue" location="Huntsville, Al" temperature="0" humidity="0" windSpeed="0" feelsLike="0" />
6056 <Markdown children="Here's the weather in Chicago..."/>
61- <weather themeColor="blue " location="Chicago, IL" temperature="0" humidity="0" windSpeed="0" feelsLike="0" />
57+ <weather themeColor="orange " location="Chicago, IL" temperature="0" humidity="0" windSpeed="0" feelsLike="0" />
6258 </ui>
59+
60+ Hint: use a variety of theme colors based on the temperature.
6361 ` ,
6462 components : [
6563 exposeMarkdown ( ) ,
You can’t perform that action at this time.
0 commit comments