diff --git a/CC BY-NC 4.0.docx b/CC BY-NC 4.0.docx new file mode 100644 index 00000000..0d8f7d55 Binary files /dev/null and b/CC BY-NC 4.0.docx differ diff --git a/LICENSE b/LICENSE index 8a29bc5a..3d85d05f 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work. same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright 2024 Yoshiki Miura +Copyright 2025 Eric Ngoiya Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/app/actions.tsx b/app/actions.tsx index 9e0ee20a..fd19373d 100644 --- a/app/actions.tsx +++ b/app/actions.tsx @@ -93,7 +93,14 @@ async function submit(formData?: FormData, skip?: boolean) { // Create a streamable value for the summary. const summaryStream = createStreamableValue(''); - async function processResolutionSearch() { + // Immediately append the BotMessage component to the UI stream. + uiStream.append( +
+ +
+ ); + + (async () => { try { // Call the simplified agent, which now returns a stream. const streamResult = await resolutionSearch(messages, timezone, drawnFeatures); @@ -109,7 +116,7 @@ async function submit(formData?: FormData, skip?: boolean) { const analysisResult = await streamResult.object; // Mark the summary stream as done with the result. - summaryStream.done(analysisResult.summary || 'Analysis complete.'); + summaryStream.done(analysisResult.summary || fullSummary || 'Analysis complete.'); messages.push({ role: 'assistant', content: analysisResult.summary || 'Analysis complete.' }); @@ -171,17 +178,7 @@ async function submit(formData?: FormData, skip?: boolean) { isGenerating.done(false); uiStream.done(); } - } - - // Start the background process without awaiting it. - processResolutionSearch(); - - // Immediately update the UI stream with the BotMessage component. - uiStream.update( -
- -
- ); + })(); return { id: nanoid(), diff --git a/app/globals.css b/app/globals.css index 22f95cba..4fcbde34 100644 --- a/app/globals.css +++ b/app/globals.css @@ -189,7 +189,7 @@ .mobile-chat-input-area { height: auto; - padding: 10px; + padding: 4px 10px; background-color: hsl(var(--background)); /* border-top: 1px solid hsl(var(--border)); */ /* Removed for cleaner separation */ border-bottom: 1px solid hsl(var(--border)); /* Added for separation from messages area below */ @@ -198,62 +198,6 @@ display: flex; align-items: center; } - - .mobile-chat-input { - /* position: relative; */ /* No longer fixed to bottom */ - /* bottom: 0; */ - /* left: 0; */ /* Handled by parent flex */ - /* right: 0; */ /* Handled by parent flex */ - width: 100%; /* Ensure it takes full width of its container */ - padding: 10px; - background-color: hsl(var(--background)); - /* border-top: 1px solid hsl(var(--border)); */ /* Removed to avoid double border */ - /* z-index: 30; */ /* No longer needed */ - } - - .mobile-chat-input input { - width: 100%; - padding: 8px; - border: 1px solid hsl(var(--input)); - border-radius: var(--radius); - background-color: hsl(var(--input)); - color: hsl(var(--foreground)); - box-sizing: border-box; - } - - .mobile-icons-bar-content .icon-button { - display: flex; - align-items: center; - justify-content: center; - width: 40px; - height: 40px; - border-radius: 50%; - background-color: hsl(var(--secondary)); - color: hsl(var(--secondary-foreground)); - cursor: pointer; - } - - .mobile-icons-bar-content .icon-button:hover { - background-color: hsl(var(--secondary-foreground)); - color: hsl(var(--secondary)); - } - - .mobile-chat-input .icon-button { - position: absolute; - top: 50%; - transform: translateY(-50%); - background-color: transparent; - border: none; - cursor: pointer; - } - - .mobile-chat-input .icon-button.paperclip { - right: 40px; - } - - .mobile-chat-input .icon-button.arrow-right { - right: 10px; - } } /* Added for MapboxDraw controls */ diff --git a/app/layout.tsx b/app/layout.tsx index a092d4fe..bddadc19 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -12,7 +12,10 @@ import { SpeedInsights } from "@vercel/speed-insights/next" import { Toaster } from '@/components/ui/sonner' import { MapToggleProvider } from '@/components/map-toggle-context' import { ProfileToggleProvider } from '@/components/profile-toggle-context' +import { UsageToggleProvider } from '@/components/usage-toggle-context' import { CalendarToggleProvider } from '@/components/calendar-toggle-context' +import { HistoryToggleProvider } from '@/components/history-toggle-context' +import { HistorySidebar } from '@/components/history-sidebar' import { MapLoadingProvider } from '@/components/map-loading-context'; import ConditionalLottie from '@/components/conditional-lottie'; import { MapProvider as MapContextProvider } from '@/components/map/map-context' @@ -70,28 +73,33 @@ export default function RootLayout({ )} > - - - - - -
- - {children} - -