Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docker/docker-compose.cpu.api-only-local-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ services:
- Ui__RootPath=/app/ui
- Ui__DevServerUrl=
- ALLOWED_ORIGINS=*
- ANTRUNNER_SERVICES_HOST_URL=http://guideants-webapi-ui:8080/
- SearXngSearch__BaseUrl=http://searxng:8080
- BrowserRendering__BaseUrl=http://searxng:8080
- LocalServiceHosts__SpeechTranscriptionBaseUrl=http://guideants-ai:80
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose.cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ services:
- Ui__RootPath=/app/ui
- Ui__DevServerUrl=
- ALLOWED_ORIGINS=*
- ANTRUNNER_SERVICES_HOST_URL=http://guideants-webapi-ui:8080/
- SearXngSearch__BaseUrl=http://searxng:8080
- BrowserRendering__BaseUrl=http://searxng:8080
- LocalServiceHosts__SpeechTranscriptionBaseUrl=http://guideants-ai:80
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose.cuda.api-only-local-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ services:
- Ui__RootPath=/app/ui
- Ui__DevServerUrl=
- ALLOWED_ORIGINS=*
- ANTRUNNER_SERVICES_HOST_URL=http://guideants-webapi-ui:8080/
- SearXngSearch__BaseUrl=http://searxng:8080
- BrowserRendering__BaseUrl=http://searxng:8080
- LocalServiceHosts__SpeechTranscriptionBaseUrl=http://guideants-ai:80
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose.cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ services:
- Ui__RootPath=/app/ui
- Ui__DevServerUrl=
- ALLOWED_ORIGINS=*
- ANTRUNNER_SERVICES_HOST_URL=http://guideants-webapi-ui:8080/
- SearXngSearch__BaseUrl=http://searxng:8080
- BrowserRendering__BaseUrl=http://searxng:8080
- LocalServiceHosts__SpeechTranscriptionBaseUrl=http://guideants-ai:80
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose.ghcr-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ services:
- Ui__RootPath=/app/ui
- Ui__DevServerUrl=
- ALLOWED_ORIGINS=*
- ANTRUNNER_SERVICES_HOST_URL=http://guideants-webapi-ui:8080/
- SearXngSearch__BaseUrl=http://searxng:8080
- BrowserRendering__BaseUrl=http://searxng:8080
- LocalServiceHosts__SpeechTranscriptionBaseUrl=http://guideants-ai:80
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose.ghcr-cuda13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ services:
- Ui__RootPath=/app/ui
- Ui__DevServerUrl=
- ALLOWED_ORIGINS=*
- ANTRUNNER_SERVICES_HOST_URL=http://guideants-webapi-ui:8080/
- SearXngSearch__BaseUrl=http://searxng:8080
- BrowserRendering__BaseUrl=http://searxng:8080
- LocalServiceHosts__SpeechTranscriptionBaseUrl=http://guideants-ai:80
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose.ghcr-rocm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ services:
- Ui__RootPath=/app/ui
- Ui__DevServerUrl=
- ALLOWED_ORIGINS=*
- ANTRUNNER_SERVICES_HOST_URL=http://guideants-webapi-ui:8080/
- SearXngSearch__BaseUrl=http://searxng:8080
- BrowserRendering__BaseUrl=http://searxng:8080
- LocalServiceHosts__SpeechTranscriptionBaseUrl=http://guideants-ai:80
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose.ghcr-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ services:
- FileStorage__Path=/app/ContentFiles
- Ui__RootPath=/app/ui
- Ui__DevServerUrl=
- ANTRUNNER_SERVICES_HOST_URL=http://guideants-webapi-ui:8080/
- SearXngSearch__BaseUrl=http://searxng:8080
- BrowserRendering__BaseUrl=http://searxng:8080
- LocalServiceHosts__SpeechTranscriptionBaseUrl=http://127.0.0.1:9
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose.rocm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ services:
- Ui__RootPath=/app/ui
- Ui__DevServerUrl=
- ALLOWED_ORIGINS=*
- ANTRUNNER_SERVICES_HOST_URL=http://guideants-webapi-ui:8080/
- SearXngSearch__BaseUrl=http://searxng:8080
- BrowserRendering__BaseUrl=http://searxng:8080
- LocalServiceHosts__SpeechTranscriptionBaseUrl=http://guideants-ai:80
Expand Down
1 change: 0 additions & 1 deletion docker/docker-compose.slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ services:
- FileStorage__Path=/app/ContentFiles
- Ui__RootPath=/app/ui
- Ui__DevServerUrl=
- ANTRUNNER_SERVICES_HOST_URL=http://guideants-webapi-ui:8080/
- SearXngSearch__BaseUrl=http://searxng:8080
- BrowserRendering__BaseUrl=http://searxng:8080
- LocalServiceHosts__SpeechTranscriptionBaseUrl=http://127.0.0.1:9
Expand Down
35 changes: 34 additions & 1 deletion src/client/src/components/guides/PublishGuideDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { InterfaceTab } from './configTabs/InterfaceTab';
import { FeaturesTab } from './configTabs/FeaturesTab';
import { LimitsTab } from './configTabs/LimitsTab';
import { AuthTab } from './configTabs/AuthTab';
import { McpTab } from './configTabs/McpTab';

interface PublishGuideDialogProps {
guideName: string;
Expand All @@ -19,7 +20,7 @@ interface PublishGuideDialogProps {
onCancel: () => void;
}

type TabId = 'general' | 'interface' | 'features' | 'limits' | 'auth';
type TabId = 'general' | 'interface' | 'features' | 'limits' | 'auth' | 'mcp';

export function PublishGuideDialog({
guideName,
Expand Down Expand Up @@ -67,8 +68,17 @@ export function PublishGuideDialog({
const [authWebhookTimeout, setAuthWebhookTimeout] = useState<number>(publishedGuide?.authWebhookTimeoutSeconds || 5);
const [hasApiKey, setHasApiKey] = useState(publishedGuide?.hasApiKey || false);

// MCP
const [mcpEnabled, setMcpEnabled] = useState(publishedGuide?.mcpEnabled || false);
const [mcpDescription, setMcpDescription] = useState(publishedGuide?.mcpDescription || '');

const isActive = publishedGuide?.active ?? true;

// MCP requires an API key — keep it disabled while none is configured
useEffect(() => {
if (!hasApiKey) setMcpEnabled(false);
}, [hasApiKey]);

// Debounced friendly name validation
const validateFriendlyName = useCallback(async (name: string) => {
if (!name.trim() || !guideId) {
Expand Down Expand Up @@ -145,6 +155,8 @@ export function PublishGuideDialog({
billingPeriodChargeLimitUsd: billingPeriodChargeLimitUsd ?? undefined,
authValidationWebhookUrl: authWebhookUrl.trim() || undefined,
authWebhookTimeoutSeconds: authWebhookUrl.trim() ? authWebhookTimeout : undefined,
mcpEnabled,
mcpDescription: mcpDescription.trim() || undefined,
};

if (isEditMode && onUpdate) {
Expand All @@ -165,6 +177,14 @@ export function PublishGuideDialog({
setShowDeactivateConfirm(false);
};

const handleGenerateApiKey = async (): Promise<string> => {
const pubId = publishedGuide?.id;
if (!pubId) throw new Error('Guide must be published first');
const response = await api.guides.guides.generateApiKey(guideId, pubId);
setHasApiKey(true);
return response.apiKey;
};

useEffect(() => {
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape' && !showDeactivateConfirm) {
Expand All @@ -191,6 +211,7 @@ export function PublishGuideDialog({
{ id: 'features', label: 'Features' },
{ id: 'limits', label: 'Limits' },
{ id: 'auth', label: 'Auth' },
{ id: 'mcp', label: 'MCP' },
];

const dialogMarkup = (
Expand Down Expand Up @@ -331,6 +352,18 @@ export function PublishGuideDialog({
onApiKeyChange={setHasApiKey}
/>
)}

{activeTab === 'mcp' && (
<McpTab
mcpEnabled={mcpEnabled}
setMcpEnabled={setMcpEnabled}
mcpDescription={mcpDescription}
setMcpDescription={setMcpDescription}
hasApiKey={hasApiKey}
publishedGuideId={publishedGuide?.id}
onGenerateApiKey={publishedGuide?.id ? handleGenerateApiKey : undefined}
/>
)}
</fieldset>
</form>

Expand Down
Loading
Loading