mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-11 20:05:25 +00:00
feedback
This commit is contained in:
parent
3c0af96b18
commit
0e703f5314
2 changed files with 9 additions and 2 deletions
|
|
@ -116,7 +116,7 @@ export const AskSourcebotDemoCards = ({
|
||||||
const context = demoExamples.searchContexts.find((context) => context.id === contextExample.searchContext)
|
const context = demoExamples.searchContexts.find((context) => context.id === contextExample.searchContext)
|
||||||
if (!context) {
|
if (!context) {
|
||||||
console.error(`Search context ${contextExample.searchContext} not found on handleContextClick`);
|
console.error(`Search context ${contextExample.searchContext} not found on handleContextClick`);
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isSelected = selectedItems.some(
|
const isSelected = selectedItems.some(
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,14 @@ export default async function Home({ params: { domain } }: { params: { domain: s
|
||||||
searchModeCookie?.value === "precise"
|
searchModeCookie?.value === "precise"
|
||||||
) ? searchModeCookie.value : models.length > 0 ? "agentic" : "precise";
|
) ? searchModeCookie.value : models.length > 0 ? "agentic" : "precise";
|
||||||
|
|
||||||
const demoExamples = env.SOURCEBOT_DEMO_EXAMPLES_PATH ? await loadJsonFile<DemoExamples>(env.SOURCEBOT_DEMO_EXAMPLES_PATH, demoExamplesSchema) : undefined;
|
const demoExamples = env.SOURCEBOT_DEMO_EXAMPLES_PATH ? await (async () => {
|
||||||
|
try {
|
||||||
|
return await loadJsonFile<DemoExamples>(env.SOURCEBOT_DEMO_EXAMPLES_PATH!, demoExamplesSchema);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Failed to load demo examples:', error);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
})() : undefined;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col items-center overflow-hidden min-h-screen">
|
<div className="flex flex-col items-center overflow-hidden min-h-screen">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue