mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-01-16 16:31:56 +00:00
移除多个文件中的调试日志输出,优化代码可读性和性能。
This commit is contained in:
parent
a2fcb7c20f
commit
54a14dedd6
@ -79,7 +79,6 @@ const ChatHistoryView = ({
|
|||||||
|
|
||||||
// filter conversations list
|
// filter conversations list
|
||||||
const filteredConversations = useMemo(() => {
|
const filteredConversations = useMemo(() => {
|
||||||
console.log('filteredConversations', chatList)
|
|
||||||
let filtered = chatList
|
let filtered = chatList
|
||||||
|
|
||||||
// Apply search filter
|
// Apply search filter
|
||||||
|
|||||||
@ -224,8 +224,6 @@ const InsightView = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
console.log('工作区洞察初始化完成:', result.result)
|
|
||||||
|
|
||||||
// 刷新洞察列表
|
// 刷新洞察列表
|
||||||
await loadInsights()
|
await loadInsights()
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,6 @@ export const getEmbeddingModel = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const results = await embeddingManager.embedBatch(texts)
|
const results = await embeddingManager.embedBatch(texts)
|
||||||
console.log('results', results)
|
|
||||||
return results.map(result => result.vec)
|
return results.map(result => result.vec)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('LocalProvider batch embedding error:', error)
|
console.error('LocalProvider batch embedding error:', error)
|
||||||
|
|||||||
@ -30,7 +30,6 @@ export class InsightRepository {
|
|||||||
const result = await this.db.query<SelectSourceInsight>(
|
const result = await this.db.query<SelectSourceInsight>(
|
||||||
`SELECT * FROM "${tableName}" ORDER BY created_at DESC`
|
`SELECT * FROM "${tableName}" ORDER BY created_at DESC`
|
||||||
)
|
)
|
||||||
console.log(result.rows)
|
|
||||||
return result.rows
|
return result.rows
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -156,7 +156,6 @@ export class VectorManager {
|
|||||||
// 保存原始内容,不在此处调用 removeMarkdown
|
// 保存原始内容,不在此处调用 removeMarkdown
|
||||||
const rawContent = chunk.pageContent.replace(/\0/g, '')
|
const rawContent = chunk.pageContent.replace(/\0/g, '')
|
||||||
if (!rawContent || rawContent.trim().length === 0) {
|
if (!rawContent || rawContent.trim().length === 0) {
|
||||||
console.log("skipped chunk", chunk.pageContent)
|
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -83,7 +83,7 @@ async function loadModel(modelKey: string, useGpu: boolean = false) {
|
|||||||
progress_callback: (progress: any) => {
|
progress_callback: (progress: any) => {
|
||||||
try {
|
try {
|
||||||
if (progress && typeof progress === 'object') {
|
if (progress && typeof progress === 'object') {
|
||||||
console.log('Model loading progress:', progress);
|
// console.log('Model loading progress:', progress);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// 忽略进度回调错误,避免中断模型加载
|
// 忽略进度回调错误,避免中断模型加载
|
||||||
|
|||||||
@ -414,7 +414,7 @@ export default class InfioPlugin extends Plugin {
|
|||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
new Notice('Dataview 查询成功!结果已在控制台输出');
|
new Notice('Dataview 查询成功!结果已在控制台输出');
|
||||||
console.log('查询结果:', result.data);
|
// console.log('查询结果:', result.data);
|
||||||
} else {
|
} else {
|
||||||
new Notice(`查询失败: ${result.error}`);
|
new Notice(`查询失败: ${result.error}`);
|
||||||
console.error('查询错误:', result.error);
|
console.error('查询错误:', result.error);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user