Skip to content

Commit d35602c

Browse files
authored
refactor(tarko): remove meaningless re-exports and restructure web-ui config (#1307)
1 parent f27942e commit d35602c

File tree

16 files changed

+15
-25
lines changed

16 files changed

+15
-25
lines changed

multimodal/tarko/agent-web-ui/src/common/constants/index.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,4 @@ export const CONNECTION_SETTINGS = {
8181
RECONNECTION_DELAY_MAX: 5000,
8282
};
8383

84-
/**
85-
* Agent configuration
86-
*/
87-
export {
88-
getAgentTitle,
89-
getWebUIConfig,
90-
isContextualSelectorEnabled,
91-
getLogoUrl,
92-
getWorkspaceNavItems,
93-
getGUIAgentConfig,
94-
} from './shared';
84+

multimodal/tarko/agent-web-ui/src/common/state/atoms/ui.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { atom } from 'jotai';
22
import { AgentProcessingPhase, AgentStatusInfo, SessionItemInfo, LayoutMode } from '@tarko/interface';
3-
import { getDefaultLayoutMode } from '@/common/constants/shared';
3+
import { getDefaultLayoutMode } from '@/config/web-ui-config';
44
import {
55
ConnectionStatus,
66
PanelContent,

multimodal/tarko/agent-web-ui/src/common/constants/shared.ts renamed to multimodal/tarko/agent-web-ui/src/config/web-ui-config.ts

File renamed without changes.

multimodal/tarko/agent-web-ui/src/standalone/chat/ChatPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { groupedMessagesAtom, messagesAtom } from '@/common/state/atoms/message'
1010
import { replayStateAtom } from '@/common/state/atoms/replay';
1111
import { useReplayMode } from '@/common/hooks/useReplayMode';
1212
import { useReplay } from '@/common/hooks/useReplay';
13-
import { getAgentTitle } from '@/common/constants';
13+
import { getAgentTitle } from '@/config/web-ui-config';
1414
import { useAutoScroll } from './hooks/useAutoScroll';
1515
import { ScrollToBottomButton } from './components/ScrollToBottomButton';
1616

multimodal/tarko/agent-web-ui/src/standalone/chat/Message/components/MessageGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ThinkingAnimation } from './ThinkingAnimation';
77
import { SkeletonLoader } from './SkeletonLoader';
88
import { useAtomValue } from 'jotai';
99
import { agentStatusAtom } from '@/common/state/atoms/ui';
10-
import { getAgentTitle } from '@/common/constants';
10+
import { getAgentTitle } from '@/config/web-ui-config';
1111

1212
interface MessageGroupProps {
1313
messages: MessageType[];

multimodal/tarko/agent-web-ui/src/standalone/chat/Message/components/ThinkingAnimation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { motion } from 'framer-motion';
33
import { FiCpu, FiZap, FiLoader, FiPlay } from 'react-icons/fi';
44
import { AgentProcessingPhase } from '@tarko/interface';
5-
import { getAgentTitle } from '@/common/constants';
5+
import { getAgentTitle } from '@/config/web-ui-config';
66

77
interface ThinkingAnimationProps {
88
size?: 'small' | 'medium' | 'large';

multimodal/tarko/agent-web-ui/src/standalone/chat/MessageInput/MessageAttachments.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ImagePreview } from '../ImagePreview';
66
import { ContextualTags } from '../ContextualTags';
77
import { ContextualItem } from '../ContextualSelector';
88
import { removeContextualItemAction } from '@/common/state/atoms/contextualSelector';
9-
import { isContextualSelectorEnabled } from '@/common/constants';
9+
import { isContextualSelectorEnabled } from '@/config/web-ui-config';
1010

1111
interface MessageAttachmentsProps {
1212
images: ChatCompletionContentPart[];

multimodal/tarko/agent-web-ui/src/standalone/chat/MessageInput/MessageInputField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
updateSelectorStateAction,
1212
} from '@/common/state/atoms/contextualSelector';
1313
import { ContextualSelector, ContextualItem } from '../ContextualSelector';
14-
import { getAgentTitle, isContextualSelectorEnabled } from '@/common/constants';
14+
import { getAgentTitle, isContextualSelectorEnabled } from '@/config/web-ui-config';
1515

1616
interface MessageInputFieldProps {
1717
uploadedImages: ChatCompletionContentPart[];

multimodal/tarko/agent-web-ui/src/standalone/home/WelcomePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { motion } from 'framer-motion';
33
import { useNavigate } from 'react-router-dom';
44
import { FiArrowRight, FiArrowUpRight } from 'react-icons/fi';
55
import { useSession } from '@/common/hooks/useSession';
6-
import { getWebUIConfig, getLogoUrl, getAgentTitle } from '@/common/constants';
6+
import { getWebUIConfig, getLogoUrl, getAgentTitle } from '@/config/web-ui-config';
77

88
const WelcomePage: React.FC = () => {
99
const navigate = useNavigate();

multimodal/tarko/agent-web-ui/src/standalone/navbar/AboutModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { FiX, FiExternalLink, FiGithub, FiGlobe, FiCpu, FiCopy, FiCheck } from '
55
import { FaBrain } from 'react-icons/fa';
66
import { apiService } from '@/common/services/apiService';
77
import { AgentServerVersionInfo, SessionItemInfo } from '@agent-tars/interface';
8-
import { getWebUIConfig, getLogoUrl, getAgentTitle } from '@/common/constants';
8+
import { getWebUIConfig, getLogoUrl, getAgentTitle } from '@/config/web-ui-config';
99

1010
interface AboutModalProps {
1111
isOpen: boolean;

0 commit comments

Comments
 (0)