Skip to content

Commit b8cd678

Browse files
committed
feat: update weather agent and Google configuration
- Added cached content option to the weather agent for improved performance. - Updated Google model initialization to use languageModel method for various chat and image models. - Commented out unused imports and variables in Google configuration files. refactor: modify embedding model initialization - Changed embedding model initialization in LanceDB, MongoDB, and Qdrant configurations to use ModelRouterEmbeddingModel for better flexibility. fix: adjust sampling probability in Mastra configuration - Increased sampling probability from 0.5 to 0.75 to enhance decision-making in the agent's sampling strategy. chore: update crawler statistics and session pool state - Modified SDK_CRAWLER_STATISTICS_0.json to reflect new request metrics and timestamps. - Updated SDK_SESSION_POOL_STATE.json with new session IDs and cookie values for improved session management. feat: implement weather tool logging enhancements - Updated logging in the weather tool to include more detailed information about tool calls and input handling. chore: add Convex configuration file - Created convex.json to define Node.js version for the Convex framework. test: add agent registry tests - Implemented tests for agent registry to ensure all expected agents are present. chore: add OpenTelemetry instrumentation setup - Created instrumentation file for OpenTelemetry to enable tracing and monitoring of the application.
1 parent 6cc3aab commit b8cd678

19 files changed

Lines changed: 38591 additions & 38331 deletions

File tree

app/chat/components/agent-tools.tsx

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ export function AgentTools({ tools, className }: AgentToolsProps) {
282282
<CompanyProfileCard
283283
key={`${id}-${toolName}-${toolState}-${groupIdx}`}
284284
toolCallId={id}
285-
input={latest.input as any}
286-
output={latest.output as any}
285+
input={latest.input as PolygonStockQuotesUITool['input']}
286+
output={latest.output as PolygonStockQuotesUITool['output']}
287287
errorText={errorText}
288288
/>
289289
)
@@ -294,8 +294,8 @@ export function AgentTools({ tools, className }: AgentToolsProps) {
294294
<CommitHistoryList
295295
key={`${id}-${toolName}-${toolState}-${groupIdx}`}
296296
toolCallId={id}
297-
input={latest.input as any}
298-
output={latest.output as any}
297+
input={latest.input as ListCommitsUITool['input']}
298+
output={latest.output as ListCommitsUITool['output']}
299299
errorText={errorText}
300300
/>
301301
)
@@ -309,59 +309,59 @@ export function AgentTools({ tools, className }: AgentToolsProps) {
309309
>
310310
<WeatherCard
311311
toolCallId={id}
312-
input={latest.input as { location: string }}
312+
input={latest.input as WeatherUITool['input']}
313313
output={latest.output as any}
314314
errorText={errorText}
315315
/>
316316
<ForecastView
317317
toolCallId={id}
318-
input={latest.input as { location: string }}
318+
input={latest.input as WeatherUITool['input']}
319319
output={latest.output as any}
320320
errorText={errorText}
321321
/>
322322
</div>
323323
)
324324
}
325325

326-
if (
327-
(toolName === 'serpapi-news-trends' ||
328-
toolName === 'finnhub-company-news') &&
329-
hasOutput
330-
) {
331-
return (
332-
<NewsCarousel
333-
key={`${id}-${toolName}-${toolState}-${groupIdx}`}
334-
toolCallId={id}
335-
input={latest.input as any}
336-
output={latest.output as any}
337-
errorText={errorText}
338-
/>
339-
)
340-
}
326+
// if (
327+
// (toolName === 'serpapi-news-trends' ||
328+
// toolName === 'finnhub-company-news') &&
329+
// hasOutput
330+
// ) {
331+
// return (
332+
// <NewsCarousel
333+
// key={`${id}-${toolName}-${toolState}-${groupIdx}`}
334+
// toolCallId={id}
335+
// input={latest.input as any}
336+
// output={latest.output as any}
337+
// errorText={errorText}
338+
// />
339+
// )
340+
// }
341341

342342
if (toolName === 'arxiv-search' && hasOutput) {
343343
return (
344344
<ArxivPaperCard
345345
key={`${id}-${toolName}-${toolState}-${groupIdx}`}
346346
toolCallId={id}
347-
input={latest.input as any}
348-
output={latest.output as any}
347+
input={latest.input as ArxivUITool['input']}
348+
output={latest.output as ArxivUITool['output']}
349349
errorText={errorText}
350350
/>
351351
)
352352
}
353353

354-
if (toolName === 'serpapi-search' && hasOutput) {
355-
return (
356-
<SearchResultList
357-
key={`${id}-${toolName}-${toolState}-${groupIdx}`}
358-
toolCallId={id}
359-
input={latest.input as any}
360-
output={latest.output as any}
361-
errorText={errorText}
362-
/>
363-
)
364-
}
354+
// if (toolName === 'serpapi-search' && hasOutput) {
355+
// return (
356+
// <SearchResultList
357+
// key={`${id}-${toolName}-${toolState}-${groupIdx}`}
358+
// toolCallId={id}
359+
// input={latest.input as any}
360+
// output={latest.output as any}
361+
// errorText={errorText}
362+
// />
363+
// )
364+
// }
365365

366366
// Default rendering for other tools
367367
return (

app/chat/components/chat-input.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export function ChatInput() {
7272
messages,
7373
usage,
7474
createCheckpoint,
75+
7576
} = useChatContext()
7677

7778
const [input, setInput] = useState('')
@@ -124,6 +125,7 @@ export function ChatInput() {
124125
<span className="flex items-center gap-1.5">
125126
<BotIcon className="size-3" />
126127
{agentConfig?.name ?? selectedAgent}
128+
127129
</span>
128130
<span className="flex items-center gap-1.5">
129131
<CpuIcon className="size-3" />

0 commit comments

Comments
 (0)