mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-24 05:22:22 +02:00
[eric] imports: move mcp-tool-name helpers into shared
This commit is contained in:
@@ -15,7 +15,7 @@ import { GoogleServiceIcon } from './GoogleServiceIcon';
|
||||
import { ElapsedTimer, formatElapsed } from './toolBubbleChrome';
|
||||
import { useTermColors } from './toolColorize';
|
||||
import { ParsedResult } from './toolResultParsing';
|
||||
import { McpToolInfo, getMcpShortAction } from './mcpToolName';
|
||||
import { McpToolInfo, getMcpShortAction } from '@/shared/mcpToolMeta';
|
||||
import { McpResultCard } from './McpResultCard';
|
||||
|
||||
interface CompactMcpBubbleProps {
|
||||
|
||||
@@ -17,7 +17,7 @@ import { GoogleServiceIcon } from './GoogleServiceIcon';
|
||||
import { ElapsedTimer, formatElapsed } from './toolBubbleChrome';
|
||||
import { useTermColors, colorizeInput, colorizeOutput } from './toolColorize';
|
||||
import { ParsedResult } from './toolResultParsing';
|
||||
import { McpToolInfo } from './mcpToolName';
|
||||
import { McpToolInfo } from '@/shared/mcpToolMeta';
|
||||
import { McpResultCard } from './McpResultCard';
|
||||
|
||||
interface DefaultToolBubbleProps {
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
getResultSummary,
|
||||
getPromptPrefix,
|
||||
} from './toolResultParsing';
|
||||
import { parseMcpToolName } from './mcpToolName';
|
||||
import { parseMcpToolName } from '@/shared/mcpToolMeta';
|
||||
import {
|
||||
isBrowserAgentTool,
|
||||
isInvokeAgentTool,
|
||||
@@ -26,8 +26,8 @@ import { CreateAgentBubble } from './CreateAgentBubble';
|
||||
import { CompactMcpBubble } from './CompactMcpBubble';
|
||||
import { DefaultToolBubble } from './DefaultToolBubble';
|
||||
|
||||
export { parseMcpToolName, getMcpShortAction } from './mcpToolName';
|
||||
export type { McpToolInfo } from './mcpToolName';
|
||||
export { parseMcpToolName, getMcpShortAction } from '@/shared/mcpToolMeta';
|
||||
export type { McpToolInfo } from '@/shared/mcpToolMeta';
|
||||
|
||||
export interface ToolPair {
|
||||
type: 'tool_pair';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { parseMcpToolName } from './mcpToolName';
|
||||
import { parseMcpToolName } from '@/shared/mcpToolMeta';
|
||||
|
||||
export function isBrowserAgentTool(name: string): boolean {
|
||||
if (name === 'CreateBrowserAgent' || name === 'BrowserAgent' || name === 'BrowserAgents') return true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getGmailHeader } from './mcpToolName';
|
||||
import { getGmailHeader } from '@/shared/mcpToolMeta';
|
||||
|
||||
export function formatTimestamp(ts: string | number | undefined): string {
|
||||
if (!ts) return '';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { useThemeMode } from '@/shared/styles/ThemeContext';
|
||||
import { parseMcpToolName } from './mcpToolName';
|
||||
import { parseMcpToolName } from '@/shared/mcpToolMeta';
|
||||
import { isBashTool } from './toolResultParsing';
|
||||
|
||||
export interface TermColors {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { AgentMessage } from '@/shared/state/agentsSlice';
|
||||
import { prettyPath, prettyUrl, quoteQuery, bashCommandDetail } from './toolLabels';
|
||||
import { parseMcpToolName, getMcpInputSummary, getGmailHeader } from './mcpToolName';
|
||||
import { parseMcpToolName, getMcpInputSummary, getGmailHeader } from '@/shared/mcpToolMeta';
|
||||
|
||||
export function getToolData(call: AgentMessage) {
|
||||
const content = typeof call.content === 'object' ? call.content : {};
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
import { useAppDispatch, useAppSelector } from '@/shared/hooks';
|
||||
import { QuestionForm } from '@/app/pages/AgentChat/ApprovalBar';
|
||||
import AgentChat from '@/app/pages/AgentChat/AgentChat';
|
||||
import { parseMcpToolName, getMcpShortAction } from '@/app/pages/AgentChat/ToolCallBubble';
|
||||
import { parseMcpToolName, getMcpShortAction } from '@/shared/mcpToolMeta';
|
||||
import { useClaudeTokens } from '@/shared/styles/ThemeContext';
|
||||
import { useDashboardActive } from '@/shared/hooks/useDashboardActive';
|
||||
import { useOverlayScrollPassthrough } from './useOverlayScrollPassthrough';
|
||||
|
||||
Reference in New Issue
Block a user