update buildin mcp tools

This commit is contained in:
duanfuxiang
2025-06-08 22:33:01 +08:00
parent 2b571f67a7
commit 4053214078
10 changed files with 996 additions and 91 deletions

View File

@@ -4,6 +4,26 @@ export type QueryProgressState =
| {
type: 'reading-mentionables'
}
| {
type: 'reading-files'
currentFile?: string
totalFiles?: number
completedFiles?: number
}
| {
type: 'reading-files-done'
fileContents: Array<{ path: string, content: string }>
}
| {
type: 'reading-websites'
currentUrl?: string
totalUrls?: number
completedUrls?: number
}
| {
type: 'reading-websites-done'
websiteContents: Array<{ url: string, content: string }>
}
| {
type: 'indexing'
indexProgress: IndexProgress
@@ -43,6 +63,62 @@ export default function QueryProgress({
</p>
</div>
)
case 'reading-files':
return (
<div className="infio-query-progress">
<p>
{t('chat.queryProgress.readingFiles')}
<DotLoader />
</p>
{state.currentFile && (
<p className="infio-query-progress-detail">
{state.currentFile}
{state.totalFiles && state.completedFiles !== undefined && (
<span> ({state.completedFiles}/{state.totalFiles})</span>
)}
</p>
)}
</div>
)
case 'reading-files-done':
return (
<div className="infio-query-progress">
<p>
{t('chat.queryProgress.readingFilesDone')}
</p>
<p className="infio-query-progress-detail">
{t('chat.queryProgress.filesLoaded', { count: state.fileContents.length })}
</p>
</div>
)
case 'reading-websites':
return (
<div className="infio-query-progress">
<p>
{t('chat.queryProgress.readingWebsites')}
<DotLoader />
</p>
{state.currentUrl && (
<p className="infio-query-progress-detail">
{state.currentUrl}
{state.totalUrls && state.completedUrls !== undefined && (
<span> ({state.completedUrls}/{state.totalUrls})</span>
)}
</p>
)}
</div>
)
case 'reading-websites-done':
return (
<div className="infio-query-progress">
<p>
{t('chat.queryProgress.readingWebsitesDone')}
</p>
<p className="infio-query-progress-detail">
{t('chat.queryProgress.websitesLoaded', { count: state.websiteContents.length })}
</p>
</div>
)
case 'indexing':
return (
<div className="infio-query-progress">