Skip to content
Open
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: 1 addition & 0 deletions apps/desktop/src/settings/DesktopClientSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as DesktopEnvironment from "../app/DesktopEnvironment.ts";
import * as DesktopClientSettings from "./DesktopClientSettings.ts";

const clientSettings: ClientSettings = {
autoReconnectSshConnections: true,
autoOpenPlanSidebar: false,
confirmThreadArchive: true,
confirmThreadDelete: false,
Expand Down
6 changes: 5 additions & 1 deletion apps/web/src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ import {
useServerKeybindings,
} from "~/rpc/serverState";
import { sanitizeThreadErrorMessage } from "~/rpc/transportError";
import { retainThreadDetailSubscription } from "../environments/runtime/service";
import {
refreshRetainedThreadDetailSubscription,
retainThreadDetailSubscription,
} from "../environments/runtime/service";
import { RightPanelSheet } from "./RightPanelSheet";
import { Button } from "./ui/button";
import {
Expand Down Expand Up @@ -3095,6 +3098,7 @@ export default function ChatView(props: ChatViewProps) {
...(bootstrap ? { bootstrap } : {}),
createdAt: messageCreatedAt,
Comment thread
ashvinnihalani marked this conversation as resolved.
});
refreshRetainedThreadDetailSubscription(activeThread.environmentId, threadIdForSend);
turnStartSucceeded = true;
})().catch(async (err: unknown) => {
if (
Expand Down
21 changes: 21 additions & 0 deletions apps/web/src/components/settings/ConnectionsSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ import {
import { useUiStateStore } from "~/uiStateStore";
import { resolveServerConfigVersionMismatch } from "~/versionSkew";
import { useServerConfig } from "~/rpc/serverState";
import { useSettings, useUpdateSettings } from "~/hooks/useSettings";
import {
connectManagedCloudEnvironment,
linkPrimaryEnvironmentToCloud,
Expand Down Expand Up @@ -1945,6 +1946,10 @@ export function ConnectionsSettings() {
DesktopServerExposureState["mode"] | null
>(null);
const primaryServerConfig = useServerConfig();
const autoReconnectSshConnections = useSettings(
(settings) => settings.autoReconnectSshConnections,
);
const { updateSettings } = useUpdateSettings();
const primaryVersionMismatch = resolveServerConfigVersionMismatch(primaryServerConfig);
const [isAdvertisedEndpointListExpanded, setIsAdvertisedEndpointListExpanded] = useState(false);
const defaultAdvertisedEndpointKey = useUiStateStore(
Expand Down Expand Up @@ -2856,6 +2861,21 @@ export function ConnectionsSettings() {
}
/>
);
const renderAutoReconnectSshRow = () => (
<SettingsRow
title="Auto-reconnect"
description="Repeatedly reconnect SSH connections. Useful for unstable remotes."
control={
<Switch
checked={autoReconnectSshConnections}
onCheckedChange={(checked) =>
updateSettings({ autoReconnectSshConnections: Boolean(checked) })
}
aria-label="Enable Auto-reconnect"
/>
}
/>
);

return (
<SettingsPageContainer>
Expand All @@ -2880,6 +2900,7 @@ export function ConnectionsSettings() {
{renderNetworkAccessRow()}
{renderEndpointRows("endpoint-rail")}
{renderTailscaleRow()}
{renderAutoReconnectSshRow()}
<CloudLinkRow canManageRelay={canManageRelay} />
</>
) : (
Expand Down
Loading
Loading