Open source file-system and knowledge based agent template. Build AI agents that stay up to date with your knowledge base
fix lint
Hugo Richardcba341e00468
diff --git a/apps/chat/app/pages/shared/[token].vue b/apps/chat/app/pages/shared/[token].vueindex 91c4cd4..450467f 100644--- a/apps/chat/app/pages/shared/[token].vue+++ b/apps/chat/app/pages/shared/[token].vue@@ -119,45 +119,45 @@ onMounted(() => {<div ref="scrollRef" class="flex-1 overflow-y-auto"><UContainer class="flex flex-col"><UChatMessages- :messages="data?.messages || []"- status="ready"- class="pt-4 sm:pt-6 pb-4 sm:pb-6"- >- <template #content="{ message }">- <template v-for="(part, index) in message.parts.filter(p => p.type !== 'data-sources')" :key="`${message.id}-${part.type}-${index}-${part.type.startsWith('tool-') ? (part as any).state ?? '' : ''}`">- <Reasoning- v-if="part.type === 'reasoning'"- :text="part.text"- :is-streaming="false"- />- <MDCCached- v-else-if="part.type === 'text' && message.role === 'assistant'"- :value="part.text"- :cache-key="`${message.id}-${index}`"- :components- :parser-options="{ highlight: false }"- class="*:first:mt-0 *:last:mb-0"- />- <p v-else-if="part.type === 'text' && message.role === 'user'" class="whitespace-pre-wrap">- {{ part.text }}- </p>- <ToolChart- v-else-if="part.type === 'tool-chart'"- :invocation="(part as ChartUIToolInvocation)"- />- <FileAvatar- v-else-if="part.type === 'file'"- :name="getFileName(part.url)"- :type="part.mediaType"- :preview-url="part.url"- />+ :messages="data?.messages || []"+ status="ready"+ class="pt-4 sm:pt-6 pb-4 sm:pb-6"+ >+ <template #content="{ message }">+ <template v-for="(part, index) in message.parts.filter(p => p.type !== 'data-sources')" :key="`${message.id}-${part.type}-${index}-${part.type.startsWith('tool-') ? (part as any).state ?? '' : ''}`">+ <Reasoning+ v-if="part.type === 'reasoning'"+ :text="part.text"+ :is-streaming="false"+ />+ <MDCCached+ v-else-if="part.type === 'text' && message.role === 'assistant'"+ :value="part.text"+ :cache-key="`${message.id}-${index}`"+ :components+ :parser-options="{ highlight: false }"+ class="*:first:mt-0 *:last:mb-0"+ />+ <p v-else-if="part.type === 'text' && message.role === 'user'" class="whitespace-pre-wrap">+ {{ part.text }}+ </p>+ <ToolChart+ v-else-if="part.type === 'tool-chart'"+ :invocation="(part as ChartUIToolInvocation)"+ />+ <FileAvatar+ v-else-if="part.type === 'file'"+ :name="getFileName(part.url)"+ :type="part.mediaType"+ :preview-url="part.url"+ />+ </template>+ <template v-for="(part, index) in (message.parts.filter(p => p.type === 'data-sources') as DataSourcesPart[])" :key="`${message.id}-sources-${index}`">+ <SourceChips+ :sources="part.data.sources"+ />+ </template></template>- <template v-for="(part, index) in (message.parts.filter(p => p.type === 'data-sources') as DataSourcesPart[])" :key="`${message.id}-sources-${index}`">- <SourceChips- :sources="part.data.sources"- />- </template>- </template></UChatMessages></UContainer></div>diff --git a/apps/chat/server/utils/bot/adapters/github.ts b/apps/chat/server/utils/bot/adapters/github.tsindex 80e0f87..dbad69f 100644--- a/apps/chat/server/utils/bot/adapters/github.ts+++ b/apps/chat/server/utils/bot/adapters/github.ts@@ -97,6 +97,7 @@ export class SavoirGitHubAdapter implements Adapter<GitHubThreadId, GitHubRawMesthis.replyToNewIssues = config.replyToNewIssues ?? false}+ // eslint-disable-next-lineasync initialize(chat: ChatInstance): Promise<void> {this.chat = chatlog.info({diff --git a/apps/chat/server/utils/create-agent.ts b/apps/chat/server/utils/create-agent.tsindex 1f13220..e1afa2a 100644--- a/apps/chat/server/utils/create-agent.ts+++ b/apps/chat/server/utils/create-agent.ts@@ -19,8 +19,7 @@ function sanitizeToolCallInputs(messages: ModelMessage[]): ModelMessage[] {log.warn('agent', `Sanitizing tool-call input for ${part.toolName}: input was a string, parsing to object`)try {part.input = JSON.parse(part.input)- }- catch {+ } catch {part.input = {}}}