refactor: update gateway agent session key handling and improve related logic

This commit is contained in:
Abhimanyu Saharan
2026-02-10 00:45:15 +05:30
parent 79f7ad8ba3
commit ba73ce8bfd
27 changed files with 233 additions and 208 deletions

View File

@@ -9,7 +9,7 @@ type GatewayFormProps = {
name: string;
gatewayUrl: string;
gatewayToken: string;
mainSessionKey: string;
mainSessionKey: string | null;
workspaceRoot: string;
gatewayUrlError: string | null;
gatewayCheckStatus: GatewayCheckStatus;
@@ -17,7 +17,6 @@ type GatewayFormProps = {
errorMessage: string | null;
isLoading: boolean;
canSubmit: boolean;
mainSessionKeyPlaceholder: string;
workspaceRootPlaceholder: string;
cancelLabel: string;
submitLabel: string;
@@ -28,7 +27,6 @@ type GatewayFormProps = {
onNameChange: (next: string) => void;
onGatewayUrlChange: (next: string) => void;
onGatewayTokenChange: (next: string) => void;
onMainSessionKeyChange: (next: string) => void;
onWorkspaceRootChange: (next: string) => void;
};
@@ -44,7 +42,6 @@ export function GatewayForm({
errorMessage,
isLoading,
canSubmit,
mainSessionKeyPlaceholder,
workspaceRootPlaceholder,
cancelLabel,
submitLabel,
@@ -55,7 +52,6 @@ export function GatewayForm({
onNameChange,
onGatewayUrlChange,
onGatewayTokenChange,
onMainSessionKeyChange,
onWorkspaceRootChange,
}: GatewayFormProps) {
return (
@@ -137,13 +133,12 @@ export function GatewayForm({
<div className="grid gap-6 md:grid-cols-2">
<div className="space-y-2">
<label className="text-sm font-medium text-slate-900">
Main session key <span className="text-red-500">*</span>
Main session key (read-only)
</label>
<Input
value={mainSessionKey}
onChange={(event) => onMainSessionKeyChange(event.target.value)}
placeholder={mainSessionKeyPlaceholder}
disabled={isLoading}
value={mainSessionKey ?? "Auto-generated by server"}
readOnly
disabled
/>
</div>
<div className="space-y-2">