Skip to content

Commit

Permalink
Fixes for VS Code Button (#5754)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbren authored Dec 22, 2024
1 parent b51dd3b commit 2cfbd26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@ import { FileExplorerHeader } from "./file-explorer-header";
import { useVSCodeUrl } from "#/hooks/query/use-vscode-url";
import { OpenVSCodeButton } from "#/components/shared/buttons/open-vscode-button";
import { addAssistantMessage } from "#/state/chat-slice";
import {
useWsClient,
WsClientProviderStatus,
} from "#/context/ws-client-provider";

interface FileExplorerProps {
isOpen: boolean;
onToggle: () => void;
}

export function FileExplorer({ isOpen, onToggle }: FileExplorerProps) {
const { status } = useWsClient();
const { t } = useTranslation();
const dispatch = useDispatch();

Expand Down Expand Up @@ -167,7 +162,7 @@ export function FileExplorer({ isOpen, onToggle }: FileExplorerProps) {
{isOpen && (
<OpenVSCodeButton
onClick={handleOpenVSCode}
isDisabled={status === WsClientProviderStatus.DISCONNECTED}
isDisabled={RUNTIME_INACTIVE_STATES.includes(curAgentState)}
/>
)}
</div>
Expand Down
2 changes: 2 additions & 0 deletions openhands/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
NoCacheMiddleware,
RateLimitMiddleware,
)
from openhands.server.routes.conversation import app as conversation_api_router
from openhands.server.routes.feedback import app as feedback_api_router
from openhands.server.routes.files import app as files_api_router
from openhands.server.routes.github import app as github_api_router
Expand Down Expand Up @@ -56,6 +57,7 @@ async def health():
app.include_router(files_api_router)
app.include_router(security_api_router)
app.include_router(feedback_api_router)
app.include_router(conversation_api_router)
app.include_router(new_conversation_api_router)
app.include_router(settings_router)
app.include_router(github_api_router)
Expand Down

0 comments on commit 2cfbd26

Please sign in to comment.