diff --git a/ui/desktop/src/components/settings/SettingsView.test.tsx b/ui/desktop/src/components/settings/SettingsView.test.tsx index 8854f23c9ac4..dc6864f307fe 100644 --- a/ui/desktop/src/components/settings/SettingsView.test.tsx +++ b/ui/desktop/src/components/settings/SettingsView.test.tsx @@ -75,6 +75,7 @@ describe('SettingsView', () => { expect(screen.queryByTestId('settings-local-inference-tab')).not.toBeInTheDocument(); expect(screen.queryByTestId('settings-mesh-tab')).not.toBeInTheDocument(); + expect(screen.queryByTestId('settings-sharing-tab')).not.toBeInTheDocument(); expect(screen.getByText('Models section')).toBeInTheDocument(); }); }); diff --git a/ui/desktop/src/components/settings/SettingsView.tsx b/ui/desktop/src/components/settings/SettingsView.tsx index 267d7644f728..5b47b12b4440 100644 --- a/ui/desktop/src/components/settings/SettingsView.tsx +++ b/ui/desktop/src/components/settings/SettingsView.tsx @@ -2,25 +2,13 @@ import { ScrollArea } from '../ui/scroll-area'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '../ui/tabs'; import { View, ViewOptions } from '../../utils/navigationUtils'; import ModelsSection from './models/ModelsSection'; -import SessionSharingSection from './sessions/SessionSharingSection'; -import ExternalBackendSection from './app/ExternalBackendSection'; import AppSettingsSection from './app/AppSettingsSection'; import ConfigSettings from './config/ConfigSettings'; import PromptsSettingsSection from './PromptsSettingsSection'; import { ExtensionConfig } from '../../api'; import { MainPanelLayout } from '../Layout/MainPanelLayout'; -import { - Bot, - Share2, - Monitor, - MessageSquare, - FileText, - Keyboard, -} from 'lucide-react'; +import { Bot, Monitor, MessageSquare, FileText, Keyboard } from 'lucide-react'; import { useState, useEffect, useRef } from 'react'; -import TunnelSection from './tunnel/TunnelSection'; -import GatewaySettingsSection from './gateways/GatewaySettingsSection'; -import { getTunnelStatus } from '../../api/sdk.gen'; import ChatSettingsSection from './chat/ChatSettingsSection'; import KeyboardShortcutsSection from './keyboard/KeyboardShortcutsSection'; import { CONFIGURATION_ENABLED } from '../../updates'; @@ -40,10 +28,6 @@ const i18n = defineMessages({ id: 'settingsView.tabChat', defaultMessage: 'Chat', }, - tabSession: { - id: 'settingsView.tabSession', - defaultMessage: 'Session', - }, tabPrompts: { id: 'settingsView.tabPrompts', defaultMessage: 'Prompts', @@ -75,7 +59,6 @@ export default function SettingsView({ viewOptions: SettingsViewOptions; }) { const [activeTab, setActiveTab] = useState('models'); - const [tunnelDisabled, setTunnelDisabled] = useState(false); const hasTrackedInitialTab = useRef(false); const intl = useIntl(); @@ -92,14 +75,12 @@ export default function SettingsView({ update: 'app', models: 'models', modes: 'chat', - sharing: 'sharing', styles: 'chat', tools: 'chat', app: 'app', chat: 'chat', prompts: 'prompts', keyboard: 'keyboard', - gateway: 'sharing', }; const targetTab = sectionToTab[viewOptions.section]; @@ -116,16 +97,6 @@ export default function SettingsView({ } }, [activeTab]); - useEffect(() => { - getTunnelStatus() - .then(({ data }) => { - setTunnelDisabled(data?.state === 'disabled'); - }) - .catch(() => { - setTunnelDisabled(false); - }); - }, []); - useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { if (event.key === 'Escape' && !event.defaultPrevented) { @@ -172,14 +143,6 @@ export default function SettingsView({ {intl.formatMessage(i18n.tabChat)} - - - {intl.formatMessage(i18n.tabSession)} - - - - - - {!tunnelDisabled && ( - - - - - )} - - - ({ + ModeSection: () => Mode section, +})); + +vi.mock('../dictation/DictationSettings', () => ({ + DictationSettings: () => Dictation settings, +})); + +vi.mock('./SpellcheckToggle', () => ({ + SpellcheckToggle: () => Spellcheck toggle, +})); + +vi.mock('../response_styles/ResponseStylesSection', () => ({ + ResponseStylesSection: () => Response styles section, +})); + +describe('ChatSettingsSection', () => { + it('hides project hints and prompt injection settings from ApeCloud builds', () => { + render(, { wrapper: IntlTestWrapper }); + + expect(screen.getByText('Mode section')).toBeInTheDocument(); + expect(screen.queryByText('Project Hints (.goosehints)')).not.toBeInTheDocument(); + expect(screen.queryByText('Enable Prompt Injection Detection')).not.toBeInTheDocument(); + }); +}); diff --git a/ui/desktop/src/components/settings/chat/ChatSettingsSection.tsx b/ui/desktop/src/components/settings/chat/ChatSettingsSection.tsx index a3f3ef23d08e..26f8db02b92a 100644 --- a/ui/desktop/src/components/settings/chat/ChatSettingsSection.tsx +++ b/ui/desktop/src/components/settings/chat/ChatSettingsSection.tsx @@ -1,8 +1,6 @@ import { ModeSection } from '../mode/ModeSection'; import { DictationSettings } from '../dictation/DictationSettings'; -import { SecurityToggle } from '../security/SecurityToggle'; import { ResponseStylesSection } from '../response_styles/ResponseStylesSection'; -import { GoosehintsSection } from './GoosehintsSection'; import { SpellcheckToggle } from './SpellcheckToggle'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../../ui/card'; import { defineMessages, useIntl } from '../../../i18n'; @@ -41,12 +39,6 @@ export default function ChatSettingsSection({ sessionId }: { sessionId?: string - - - - - - @@ -64,11 +56,6 @@ export default function ChatSettingsSection({ sessionId }: { sessionId?: string - - - - - ); } diff --git a/ui/desktop/src/components/settings/chat/GoosehintsModal.tsx b/ui/desktop/src/components/settings/chat/GoosehintsModal.tsx index ba0172676433..6ca27d6dff2c 100644 --- a/ui/desktop/src/components/settings/chat/GoosehintsModal.tsx +++ b/ui/desktop/src/components/settings/chat/GoosehintsModal.tsx @@ -25,7 +25,7 @@ const i18n = defineMessages({ helpText1: { id: 'goosehintsModal.helpText1', defaultMessage: - '.goosehints is a text file used to provide additional context about your project and improve the communication with Goose.', + '.goosehints is a text file used to provide additional context about your project and improve the communication with ApeMind.', }, helpText2: { id: 'goosehintsModal.helpText2', diff --git a/ui/desktop/src/components/settings/chat/GoosehintsSection.tsx b/ui/desktop/src/components/settings/chat/GoosehintsSection.tsx index 7f99c2d99a86..000fca86d740 100644 --- a/ui/desktop/src/components/settings/chat/GoosehintsSection.tsx +++ b/ui/desktop/src/components/settings/chat/GoosehintsSection.tsx @@ -12,7 +12,7 @@ const i18n = defineMessages({ description: { id: 'goosehintsSection.description', defaultMessage: - "Configure your project's .goosehints file to provide additional context to Goose", + "Configure your project's .goosehints file to provide additional context to ApeMind", }, configure: { id: 'goosehintsSection.configure', diff --git a/ui/desktop/src/i18n/messages/en.json b/ui/desktop/src/i18n/messages/en.json index e554a899f452..7317078cb8a3 100644 --- a/ui/desktop/src/i18n/messages/en.json +++ b/ui/desktop/src/i18n/messages/en.json @@ -1353,7 +1353,7 @@ "defaultMessage": ".goosehints file found at: {filePath}" }, "goosehintsModal.helpText1": { - "defaultMessage": ".goosehints is a text file used to provide additional context about your project and improve the communication with Goose." + "defaultMessage": ".goosehints is a text file used to provide additional context about your project and improve the communication with ApeMind." }, "goosehintsModal.helpText2": { "defaultMessage": "Please make sure {bold} extension is enabled in the extensions page. This extension is required to use .goosehints. You'll need to restart your session for .goosehints updates to take effect." @@ -1380,7 +1380,7 @@ "defaultMessage": "Configure" }, "goosehintsSection.description": { - "defaultMessage": "Configure your project's .goosehints file to provide additional context to Goose" + "defaultMessage": "Configure your project's .goosehints file to provide additional context to ApeMind" }, "goosehintsSection.title": { "defaultMessage": "Project Hints (.goosehints)" @@ -4184,9 +4184,6 @@ "settingsView.tabPrompts": { "defaultMessage": "Prompts" }, - "settingsView.tabSession": { - "defaultMessage": "Session" - }, "settingsView.title": { "defaultMessage": "Settings" }, diff --git a/ui/desktop/src/i18n/messages/zh-CN.json b/ui/desktop/src/i18n/messages/zh-CN.json index 0f71d2033b33..dadbf9775a63 100644 --- a/ui/desktop/src/i18n/messages/zh-CN.json +++ b/ui/desktop/src/i18n/messages/zh-CN.json @@ -1302,7 +1302,7 @@ "defaultMessage": "已找到 .goosehints 文件:{filePath}" }, "goosehintsModal.helpText1": { - "defaultMessage": ".goosehints 是一个文本文件,用于为你的项目提供额外上下文,改善与 Goose 的沟通。" + "defaultMessage": ".goosehints 是一个文本文件,用于为你的项目提供额外上下文,改善与 ApeMind 的沟通。" }, "goosehintsModal.helpText2": { "defaultMessage": "请确认已在扩展页面启用 {bold} 扩展。此扩展是使用 .goosehints 所必需的。你需要重启会话,.goosehints 的更新才会生效。" @@ -1329,7 +1329,7 @@ "defaultMessage": "配置" }, "goosehintsSection.description": { - "defaultMessage": "配置项目的 .goosehints 文件,为 Goose 提供额外上下文" + "defaultMessage": "配置项目的 .goosehints 文件,为 ApeMind 提供额外上下文" }, "goosehintsSection.title": { "defaultMessage": "项目提示(.goosehints)" @@ -4097,9 +4097,6 @@ "settingsView.tabPrompts": { "defaultMessage": "提示词" }, - "settingsView.tabSession": { - "defaultMessage": "会话" - }, "settingsView.title": { "defaultMessage": "设置" },