Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
getAIState,
getMutableAIState
} from 'ai/rsc'
import { CoreMessage, ToolResultPart, TextPart, ImagePart } from 'ai'
import { CoreMessage, ToolResultPart } from 'ai'
import { nanoid } from '@/lib/utils'
import type { FeatureCollection } from 'geojson'
import { Spinner } from '@/components/ui/spinner'
import { Section } from '@/components/section'
import { FollowupPanel } from '@/components/followup-panel'
import { inquire, researcher, taskManager, querySuggestor, resolutionSearch, type DrawnFeature } from '@/lib/agents'
import { inquire, researcher, querySuggestor, resolutionSearch, type DrawnFeature } from '@/lib/agents'
import { writer } from '@/lib/agents/writer'
import { saveChat, getSystemPrompt, generateReportContext, getDrawingContext } from '@/lib/actions/chat'
import { Chat, AIMessage } from '@/lib/types'
Expand Down Expand Up @@ -203,7 +203,9 @@ async function submit(formData?: FormData, skip?: boolean) {

const userInput = skip
? `What's next?`
: (formData?.get('input') as string) || '';
: (formData?.get('related_query') as string) ||
(formData?.get('input') as string) ||
'';
const content: CoreMessage['content'] = [{ type: 'text', text: userInput }];

const messages: CoreMessage[] = [...(aiState.get().messages as any[])].filter(
Expand Down
27 changes: 0 additions & 27 deletions app/actions.tsx.patch

This file was deleted.

100 changes: 0 additions & 100 deletions app/actions.tsx.tmp

This file was deleted.

17 changes: 0 additions & 17 deletions lib/actions/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,23 +137,6 @@ export async function saveNote(noteData: NewCalendarNote | CalendarNote): Promis
return savedNote;
});

if (result && result.chatId) {
const { createMessage } = await import('./chat-db');
await createMessage({
chatId: result.chatId,
userId: userId,
role: 'data',
content: JSON.stringify({
type: 'calendar_note',
note: {
...result,
locationTags,
userTags
},
}),
});
}

return result;
} catch (error) {
console.error('Error saving note:', error);
Expand Down