From 9b86d0d1c787366eab8a13f7d7c91c52f7817054 Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Mon, 12 Jan 2026 12:57:18 +0800 Subject: [PATCH] chore: disable xtramcp and prompts --- internal/api/user/list_prompts.go | 81 +++++++++----------- internal/services/toolkit/client/utils_v2.go | 33 ++++---- 2 files changed, 51 insertions(+), 63 deletions(-) diff --git a/internal/api/user/list_prompts.go b/internal/api/user/list_prompts.go index 96c0e081..b9d2db0a 100644 --- a/internal/api/user/list_prompts.go +++ b/internal/api/user/list_prompts.go @@ -3,64 +3,53 @@ package user import ( "context" "sort" - "time" "paperdebugger/internal/api/mapper" "paperdebugger/internal/libs/contextutil" userv1 "paperdebugger/pkg/gen/api/user/v1" - - "google.golang.org/protobuf/types/known/timestamppb" ) var defaultPrompts = []*userv1.Prompt{ // { - // Id: "1", + // Id: "2", + // CreatedAt: timestamppb.New(time.Time{}), + // UpdatedAt: timestamppb.New(time.Time{}), + // Title: "Search Relevant Papers (Powered by XtraMCP)", + // Content: "First, understand my paper and extract the key ideas into an optimized query to find papers that are relevant to my work. Then search for relevant papers to read.\n\nOptional Args:\ntop_k: 10\nStart Date: None (e.g. 2018-12-31)\nEnd Date: None (e.g. 2025-12-31)", + // IsUserPrompt: false, + // }, + // { + // Id: "3", + // CreatedAt: timestamppb.New(time.Time{}), + // UpdatedAt: timestamppb.New(time.Time{}), + // Title: "Paper Review (Powered by XtraMCP)", + // Content: "Call review_paper and evaluate my paper.\n\nOptional Args:\nTarget Venue: None (e.g. ICML, NeurIPS, CVPR)\nSeverity Level (blocker | major | minor | nit): Major\nSpecific Sections (default: entire paper): None (e.g. Abstract, Results,
)", + // IsUserPrompt: false, + // }, + // { + // Id: "4", + // CreatedAt: timestamppb.New(time.Time{}), + // UpdatedAt: timestamppb.New(time.Time{}), + // Title: "Verify Citations (Powered by XtraMCP)", + // Content: "Call verify_citations to check the validity of all citations in my paper and identify any potential issues such as incorrect formatting, missing information, or inaccurate references.", + // IsUserPrompt: false, + // }, + // { + // Id: "5", + // CreatedAt: timestamppb.New(time.Time{}), + // UpdatedAt: timestamppb.New(time.Time{}), + // Title: "Deep Research (Powered by XtraMCP)", + // Content: "First, understand my paper and extract the key ideas into an optimized query. Do deep research and compare my paper against others.", + // IsUserPrompt: false, + // }, + // { + // Id: "6", // CreatedAt: timestamppb.New(time.Time{}), // UpdatedAt: timestamppb.New(time.Time{}), - // Title: "Enhance Academic Writing (Powered by XtraGPT)", - // Content: "Suggest context-aware academic paper writing enhancements for the selected text.", + // Title: "Online Research (Powered by XtraMCP)", + // Content: "Understand my paper and run online search to find the latest papers related to my work.", // IsUserPrompt: false, // }, - { - Id: "2", - CreatedAt: timestamppb.New(time.Time{}), - UpdatedAt: timestamppb.New(time.Time{}), - Title: "Search Relevant Papers (Powered by XtraMCP)", - Content: "First, understand my paper and extract the key ideas into an optimized query to find papers that are relevant to my work. Then search for relevant papers to read.\n\nOptional Args:\ntop_k: 10\nStart Date: None (e.g. 2018-12-31)\nEnd Date: None (e.g. 2025-12-31)", - IsUserPrompt: false, - }, - { - Id: "3", - CreatedAt: timestamppb.New(time.Time{}), - UpdatedAt: timestamppb.New(time.Time{}), - Title: "Paper Review (Powered by XtraMCP)", - Content: "Call review_paper and evaluate my paper.\n\nOptional Args:\nTarget Venue: None (e.g. ICML, NeurIPS, CVPR)\nSeverity Level (blocker | major | minor | nit): Major\nSpecific Sections (default: entire paper): None (e.g. Abstract, Results,
)", - IsUserPrompt: false, - }, - { - Id: "4", - CreatedAt: timestamppb.New(time.Time{}), - UpdatedAt: timestamppb.New(time.Time{}), - Title: "Verify Citations (Powered by XtraMCP)", - Content: "Call verify_citations to check the validity of all citations in my paper and identify any potential issues such as incorrect formatting, missing information, or inaccurate references.", - IsUserPrompt: false, - }, - { - Id: "5", - CreatedAt: timestamppb.New(time.Time{}), - UpdatedAt: timestamppb.New(time.Time{}), - Title: "Deep Research (Powered by XtraMCP)", - Content: "First, understand my paper and extract the key ideas into an optimized query. Do deep research and compare my paper against others.", - IsUserPrompt: false, - }, - { - Id: "6", - CreatedAt: timestamppb.New(time.Time{}), - UpdatedAt: timestamppb.New(time.Time{}), - Title: "Online Research (Powered by XtraMCP)", - Content: "Understand my paper and run online search to find the latest papers related to my work.", - IsUserPrompt: false, - }, } func (s *UserServer) ListPrompts( diff --git a/internal/services/toolkit/client/utils_v2.go b/internal/services/toolkit/client/utils_v2.go index e502cb21..2ee837a0 100644 --- a/internal/services/toolkit/client/utils_v2.go +++ b/internal/services/toolkit/client/utils_v2.go @@ -13,7 +13,6 @@ import ( "paperdebugger/internal/libs/logger" "paperdebugger/internal/services" "paperdebugger/internal/services/toolkit/registry" - "paperdebugger/internal/services/toolkit/tools/xtramcp" chatv2 "paperdebugger/pkg/gen/api/chat/v2" "strings" "time" @@ -145,22 +144,22 @@ func initializeToolkitV2( logger.Info("[AI Client V2] Registered static LaTeX tools", "count", 0) - // Load tools dynamically from backend - xtraMCPLoader := xtramcp.NewXtraMCPLoaderV2(db, projectService, cfg.XtraMCPURI) - - // initialize MCP session first and log session ID - sessionID, err := xtraMCPLoader.InitializeMCP() - if err != nil { - logger.Errorf("[XtraMCP Client] Failed to initialize XtraMCP session: %v", err) - } else { - logger.Info("[XtraMCP Client] XtraMCP session initialized", "sessionID", sessionID) - - // dynamically load all tools from XtraMCP backend - err = xtraMCPLoader.LoadToolsFromBackend(toolRegistry) - if err != nil { - logger.Errorf("[XtraMCP Client] Failed to load XtraMCP tools: %v", err) - } - } + // // Load tools dynamically from backend + // xtraMCPLoader := xtramcp.NewXtraMCPLoaderV2(db, projectService, cfg.XtraMCPURI) + + // // initialize MCP session first and log session ID + // sessionID, err := xtraMCPLoader.InitializeMCP() + // if err != nil { + // logger.Errorf("[XtraMCP Client] Failed to initialize XtraMCP session: %v", err) + // } else { + // logger.Info("[XtraMCP Client] XtraMCP session initialized", "sessionID", sessionID) + + // // dynamically load all tools from XtraMCP backend + // err = xtraMCPLoader.LoadToolsFromBackend(toolRegistry) + // if err != nil { + // logger.Errorf("[XtraMCP Client] Failed to load XtraMCP tools: %v", err) + // } + // } return toolRegistry }