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
9 changes: 8 additions & 1 deletion apps/web/src/components/cloud-agent-next/SessionsList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { Bot, Clock, Cloud, GitBranch, Puzzle, Terminal } from 'lucide-react';
import { Bot, Clock, Cloud, GitBranch, Puzzle, Terminal, Workflow } from 'lucide-react';
import type { StoredSession } from './types';
import { TimeAgo } from '@/components/shared/TimeAgo';
import Link from 'next/link';
Expand Down Expand Up @@ -76,6 +76,13 @@ export function SessionsList({ sessions, organizationId, onSessionClick }: Sessi
Slack
</span>
);
} else if (platform === 'gastown') {
badge = (
<span className="inline-flex shrink-0 items-center gap-1 rounded bg-amber-500/20 px-2 py-0.5 text-xs font-medium text-amber-400">
<Workflow className="h-3 w-3" />
Gastown
</span>
);
} else {
// Default to Extension badge for unknown, vscode, etc.
badge = (
Expand Down
9 changes: 8 additions & 1 deletion apps/web/src/components/cloud-agent/SessionsList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { Bot, Clock, Cloud, GitBranch, Puzzle, Terminal } from 'lucide-react';
import { Bot, Clock, Cloud, GitBranch, Puzzle, Terminal, Workflow } from 'lucide-react';
import type { StoredSession } from './types';
import { formatDistanceToNow } from 'date-fns';
import Link from 'next/link';
Expand Down Expand Up @@ -78,6 +78,13 @@ export function SessionsList<T extends SessionsListItem>({
Slack
</span>
);
} else if (platform === 'gastown') {
badge = (
<span className="inline-flex shrink-0 items-center gap-1 rounded bg-amber-500/20 px-2 py-0.5 text-xs font-medium text-amber-400">
<Workflow className="h-3 w-3" />
Gastown
</span>
);
} else {
// Default to Extension badge for unknown, vscode, etc.
badge = (
Expand Down
24 changes: 10 additions & 14 deletions services/gastown/container/src/process-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ vi.mock('./agent-runner', () => ({
(kilocodeToken: string, model: string, smallModel: string, organizationId?: string) =>
JSON.stringify({ kilocodeToken, model, smallModel, organizationId })
),
buildKiloAuthEnv: vi.fn(
(kilocodeToken?: string, organizationId?: string | null) => {
const authEnv: Record<string, string> = { KILO_PLATFORM: 'gastown' };
if (kilocodeToken) {
authEnv.KILO_AUTH_CONTENT = JSON.stringify({ kilo: { type: 'api', key: kilocodeToken } });
}
if (organizationId) {
authEnv.KILO_ORG_ID = organizationId;
}
return authEnv;
buildKiloAuthEnv: vi.fn((kilocodeToken?: string, organizationId?: string | null) => {
const authEnv: Record<string, string> = { KILO_PLATFORM: 'gastown' };
if (kilocodeToken) {
authEnv.KILO_AUTH_CONTENT = JSON.stringify({ kilo: { type: 'api', key: kilocodeToken } });
}
),
if (organizationId) {
authEnv.KILO_ORG_ID = organizationId;
}
return authEnv;
}),
resolveGitCredentials: vi.fn(),
writeMayorSystemPromptToAgentsMd: vi.fn(),
ensureMayorWorkspaceForTown: vi.fn(async (_townId: string) => TEST_WORKSPACE),
Expand Down Expand Up @@ -288,9 +286,7 @@ describe('awaitHydration', () => {
});
expect(env?.KILO_CONFIG_CONTENT).toBeTruthy();
expect(env?.KILO_PLATFORM).toBe('gastown');
expect(env?.KILO_AUTH_CONTENT).toBe(
JSON.stringify({ kilo: { type: 'api', key: 'kc-tok' } })
);
expect(env?.KILO_AUTH_CONTENT).toBe(JSON.stringify({ kilo: { type: 'api', key: 'kc-tok' } }));
expect(env?.KILO_ORG_ID).toBeUndefined();
} finally {
globalThis.fetch = originalFetch;
Expand Down