refactor: remove main session key references and enhance agent-gateway associations
This commit is contained in:
@@ -20,6 +20,7 @@ export interface AgentRead {
|
||||
identity_template?: string | null;
|
||||
soul_template?: string | null;
|
||||
id: string;
|
||||
gateway_id: string;
|
||||
is_board_lead?: boolean;
|
||||
is_gateway_main?: boolean;
|
||||
openclaw_session_id?: string | null;
|
||||
|
||||
@@ -15,7 +15,6 @@ export interface GatewayRead {
|
||||
id: string;
|
||||
organization_id: string;
|
||||
token?: string | null;
|
||||
main_session_key: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,5 @@
|
||||
*/
|
||||
export interface GatewaySessionsResponse {
|
||||
sessions: unknown[];
|
||||
main_session_key?: string | null;
|
||||
main_session?: unknown | null;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ export interface GatewaysStatusResponse {
|
||||
gateway_url: string;
|
||||
sessions_count?: number | null;
|
||||
sessions?: unknown[] | null;
|
||||
main_session_key?: string | null;
|
||||
main_session?: unknown | null;
|
||||
main_session_error?: string | null;
|
||||
error?: string | null;
|
||||
|
||||
@@ -82,7 +82,6 @@ export default function EditGatewayPage() {
|
||||
const resolvedName = name ?? loadedGateway?.name ?? "";
|
||||
const resolvedGatewayUrl = gatewayUrl ?? loadedGateway?.url ?? "";
|
||||
const resolvedGatewayToken = gatewayToken ?? loadedGateway?.token ?? "";
|
||||
const resolvedMainSessionKey = loadedGateway?.main_session_key ?? null;
|
||||
const resolvedWorkspaceRoot =
|
||||
workspaceRoot ?? loadedGateway?.workspace_root ?? DEFAULT_WORKSPACE_ROOT;
|
||||
|
||||
@@ -165,7 +164,6 @@ export default function EditGatewayPage() {
|
||||
name={resolvedName}
|
||||
gatewayUrl={resolvedGatewayUrl}
|
||||
gatewayToken={resolvedGatewayToken}
|
||||
mainSessionKey={resolvedMainSessionKey}
|
||||
workspaceRoot={resolvedWorkspaceRoot}
|
||||
gatewayUrlError={gatewayUrlError}
|
||||
gatewayCheckStatus={gatewayCheckStatus}
|
||||
|
||||
@@ -178,14 +178,6 @@ export default function GatewayDetailPage() {
|
||||
Runtime
|
||||
</p>
|
||||
<div className="mt-4 space-y-3 text-sm text-slate-700">
|
||||
<div>
|
||||
<p className="text-xs uppercase text-slate-400">
|
||||
Main session key
|
||||
</p>
|
||||
<p className="mt-1 text-sm font-medium text-slate-900">
|
||||
{gateway.main_session_key}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-xs uppercase text-slate-400">
|
||||
Workspace root
|
||||
|
||||
@@ -125,7 +125,6 @@ export default function NewGatewayPage() {
|
||||
name={name}
|
||||
gatewayUrl={gatewayUrl}
|
||||
gatewayToken={gatewayToken}
|
||||
mainSessionKey={null}
|
||||
workspaceRoot={workspaceRoot}
|
||||
gatewayUrlError={gatewayUrlError}
|
||||
gatewayCheckStatus={gatewayCheckStatus}
|
||||
|
||||
@@ -134,15 +134,6 @@ export default function GatewaysPage() {
|
||||
</Link>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "main_session_key",
|
||||
header: "Main session",
|
||||
cell: ({ row }) => (
|
||||
<span className="text-sm text-slate-700">
|
||||
{truncate(row.original.main_session_key, 24)}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "workspace_root",
|
||||
header: "Workspace root",
|
||||
|
||||
@@ -9,7 +9,6 @@ type GatewayFormProps = {
|
||||
name: string;
|
||||
gatewayUrl: string;
|
||||
gatewayToken: string;
|
||||
mainSessionKey: string | null;
|
||||
workspaceRoot: string;
|
||||
gatewayUrlError: string | null;
|
||||
gatewayCheckStatus: GatewayCheckStatus;
|
||||
@@ -34,7 +33,6 @@ export function GatewayForm({
|
||||
name,
|
||||
gatewayUrl,
|
||||
gatewayToken,
|
||||
mainSessionKey,
|
||||
workspaceRoot,
|
||||
gatewayUrlError,
|
||||
gatewayCheckStatus,
|
||||
@@ -130,28 +128,16 @@ export function GatewayForm({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 (read-only)
|
||||
</label>
|
||||
<Input
|
||||
value={mainSessionKey ?? "Auto-generated by server"}
|
||||
readOnly
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<label className="text-sm font-medium text-slate-900">
|
||||
Workspace root <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<Input
|
||||
value={workspaceRoot}
|
||||
onChange={(event) => onWorkspaceRootChange(event.target.value)}
|
||||
placeholder={workspaceRootPlaceholder}
|
||||
disabled={isLoading}
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<label className="text-sm font-medium text-slate-900">
|
||||
Workspace root <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<Input
|
||||
value={workspaceRoot}
|
||||
onChange={(event) => onWorkspaceRootChange(event.target.value)}
|
||||
placeholder={workspaceRootPlaceholder}
|
||||
disabled={isLoading}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{errorMessage ? (
|
||||
|
||||
Reference in New Issue
Block a user