chore: comment out API documentation handling code (#5240)
This commit is contained in:
parent
808fdb02a7
commit
dba35bc5a4
@ -14,11 +14,10 @@ import { useLocalApiServer } from '@/hooks/useLocalApiServer'
|
||||
import { WebviewWindow } from '@tauri-apps/api/webviewWindow'
|
||||
import { useAppState } from '@/hooks/useAppState'
|
||||
import { windowKey } from '@/constants/windows'
|
||||
import { IconLogs, IconBook } from '@tabler/icons-react'
|
||||
import { IconLogs } from '@tabler/icons-react'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { ApiKeyInput } from '@/containers/ApiKeyInput'
|
||||
import { useState } from 'react'
|
||||
import { openUrl } from '@tauri-apps/plugin-opener'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export const Route = createFileRoute(route.settings.local_api_server as any)({
|
||||
@ -131,16 +130,6 @@ function LocalAPIServer() {
|
||||
}
|
||||
}
|
||||
|
||||
const handleOpenAPIDocs = async () => {
|
||||
const docsUrl = `http://${serverHost}:${serverPort}`
|
||||
try {
|
||||
console.log('Opening API documentation at:', docsUrl)
|
||||
await openUrl(docsUrl)
|
||||
} catch (error) {
|
||||
console.error('Failed to open API documentation:', error)
|
||||
}
|
||||
}
|
||||
|
||||
const isServerRunning = serverStatus === 'running'
|
||||
|
||||
return (
|
||||
@ -163,17 +152,6 @@ function LocalAPIServer() {
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
{isServerRunning && (
|
||||
<Button
|
||||
onClick={handleOpenAPIDocs}
|
||||
variant="default"
|
||||
size="sm"
|
||||
title="API Documentation"
|
||||
>
|
||||
<IconBook size={18} className="text-main-view-fg/50" />
|
||||
<span>Open Docs</span>
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
onClick={toggleAPIServer}
|
||||
variant={isServerRunning ? 'destructive' : 'default'}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user