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
83 changes: 74 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/gastown/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ RUN git lfs install --system
# Install both glibc and musl variants — the CLI's binary resolver may
# pick either depending on the detected libc.
# Also install pnpm — many projects use it as their package manager.
RUN npm install -g @kilocode/cli@7.2.14 @kilocode/cli-linux-x64@7.2.14 @kilocode/cli-linux-x64-musl@7.2.14 @kilocode/plugin@7.2.14 pnpm && \
RUN npm install -g @kilocode/cli@7.3.1 @kilocode/cli-linux-x64@7.3.1 @kilocode/cli-linux-x64-musl@7.3.1 @kilocode/plugin@7.3.1 pnpm && \
ln -s "$(which kilo)" /usr/local/bin/opencode

# Create non-root user for defense-in-depth
Expand Down
2 changes: 1 addition & 1 deletion services/gastown/container/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ RUN git lfs install --system
# pick either depending on the detected libc. bun:1-slim is Debian (glibc)
# but the resolver sometimes misdetects; installing both is safe.
# Also install pnpm — many projects use it as their package manager.
RUN npm install -g @kilocode/cli@7.2.14 @kilocode/cli-linux-arm64@7.2.14 @kilocode/cli-linux-arm64-musl@7.2.14 @kilocode/plugin@7.2.14 pnpm && \
RUN npm install -g @kilocode/cli@7.3.1 @kilocode/cli-linux-arm64@7.3.1 @kilocode/cli-linux-arm64-musl@7.3.1 @kilocode/plugin@7.3.1 pnpm && \
ln -s "$(which kilo)" /usr/local/bin/opencode

# Create non-root user for defense-in-depth
Expand Down
2 changes: 1 addition & 1 deletion services/gastown/container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@kilocode/plugin": "7.2.52",
"@kilocode/sdk": "7.2.14",
"@kilocode/sdk": "7.3.1",
"hono": "catalog:",
"zod": "catalog:"
},
Expand Down
43 changes: 42 additions & 1 deletion services/gastown/container/src/agent-runner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ vi.mock('./logger', () => ({
log: { info: vi.fn() },
}));

import { buildAgentEnv, buildKiloConfigContent } from './agent-runner';
import { buildAgentEnv, buildKiloAuthEnv, buildKiloConfigContent } from './agent-runner';
import type { StartAgentRequest } from './types';

function baseRequest(overrides: Partial<StartAgentRequest> = {}): StartAgentRequest {
Expand Down Expand Up @@ -117,3 +117,44 @@ describe('buildKiloConfigContent', () => {
expect(parsed.provider.kilo.options.kilocodeOrganizationId).toBeUndefined();
});
});

describe('buildKiloAuthEnv', () => {
it('sets KILO_PLATFORM to gastown', () => {
const env = buildKiloAuthEnv(undefined, undefined);
expect(env.KILO_PLATFORM).toBe('gastown');
});

it('sets KILO_AUTH_CONTENT when kilocodeToken is provided', () => {
const env = buildKiloAuthEnv('tok-abc', undefined);
expect(env.KILO_AUTH_CONTENT).toBe(JSON.stringify({ kilo: { type: 'api', key: 'tok-abc' } }));
});

it('omits KILO_AUTH_CONTENT when kilocodeToken is absent', () => {
const env = buildKiloAuthEnv(undefined, undefined);
expect(env.KILO_AUTH_CONTENT).toBeUndefined();
});

it('sets KILO_ORG_ID when organizationId is provided', () => {
const env = buildKiloAuthEnv('tok', 'org-123');
expect(env.KILO_ORG_ID).toBe('org-123');
});

it('omits KILO_ORG_ID when organizationId is null', () => {
const env = buildKiloAuthEnv('tok', null);
expect(env.KILO_ORG_ID).toBeUndefined();
});

it('omits KILO_ORG_ID when organizationId is undefined', () => {
const env = buildKiloAuthEnv('tok', undefined);
expect(env.KILO_ORG_ID).toBeUndefined();
});

it('sets all three env vars when both inputs are provided', () => {
const env = buildKiloAuthEnv('tok-full', 'org-full');
expect(env).toEqual({
KILO_PLATFORM: 'gastown',
KILO_AUTH_CONTENT: JSON.stringify({ kilo: { type: 'api', key: 'tok-full' } }),
KILO_ORG_ID: 'org-full',
});
});
});
Loading