Skip to content
Merged
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
31 changes: 31 additions & 0 deletions apps/cli/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
estimateCost,
redact,
EFFORT_PARAMS,
VERSION,
type Credentials,
type Effort,
} from '@deepcode/core';
Expand Down Expand Up @@ -1023,6 +1024,34 @@ export const PrCommentsCommand: SlashCommand = {
},
};

export const UpgradeCommand: SlashCommand = {
name: '/upgrade',
description: 'Show the current version and how to update.',
run() {
return [
`DeepCode CLI v${VERSION}`,
'Update the CLI: npm i -g deepcode-cli@latest',
'The macOS desktop app auto-updates via GitHub Releases.',
];
},
};

export const PrivacySettingsCommand: SlashCommand = {
name: '/privacy-settings',
description: 'Show where your data lives and what is sent to DeepSeek.',
run(_args, ctx) {
const base = ctx.creds?.baseURL || 'https://api.deepseek.com';
return [
'Privacy — DeepCode is local-first:',
' • Credentials: ~/.deepcode/credentials.json (chmod 600), or an OS keychain via apiKeyHelper.',
' • Sessions, history & snapshots: ~/.deepcode/sessions/ — local files on this machine.',
` • Prompts, file contents & tool output are sent to the DeepSeek API (${base}) to generate responses, handled per DeepSeek's policy.`,
' • Plugin / hook subprocesses run with DeepSeek credentials stripped from their env.',
' • Full threat model: docs/security-model.md.',
];
},
};

export const BUILTIN_COMMANDS: SlashCommand[] = [
HelpCommand,
ClearCommand,
Expand Down Expand Up @@ -1056,6 +1085,8 @@ export const BUILTIN_COMMANDS: SlashCommand[] = [
LoginCommand,
LogoutCommand,
PrCommentsCommand,
UpgradeCommand,
PrivacySettingsCommand,
];

// ──────────────────────────────────────────────────────────────────────────
Expand Down
20 changes: 20 additions & 0 deletions apps/cli/src/parity-commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,23 @@ describe('/pr_comments', () => {
expect(out).toMatch(/no open pull request|needs the github cli|failed/i);
});
});

describe('/upgrade + /privacy-settings', () => {
it('/upgrade shows the version + update instructions', async () => {
const out = (await reg.match('/upgrade')!.cmd.run([], ctx())).join('\n');
expect(out).toMatch(/DeepCode CLI v\d/);
expect(out).toMatch(/npm i -g deepcode-cli@latest/);
});

it('/privacy-settings shows data locations + the DeepSeek endpoint', async () => {
const out = (
await reg
.match('/privacy-settings')!
.cmd.run([], ctx({ creds: { apiKey: 'x', baseURL: 'https://api.deepseek.com/v1' } }))
).join('\n');
expect(out).toMatch(/credentials\.json/);
expect(out).toMatch(/sessions/);
expect(out).toMatch(/api\.deepseek\.com/);
expect(out).toMatch(/security-model\.md/);
});
});
4 changes: 2 additions & 2 deletions docs/BEHAVIOR_PARITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Legend: `✅` matches · `🟡` matches with caveats · `🔄` deferred · `⚠
| `/login` / `/logout` | ✓ | ✓ | ✅ — /logout clears creds + exits; /login <key> stores a new key (next launch) |
| `/export` | ✓ | ✓ | ✅ — writes the conversation to a markdown file |
| `/bug` (alias `/feedback`) | ✓ | ✓ | ✅ — prints a prefilled GitHub issue link (model/mode/effort in the body) |
| `/upgrade` | ✓ | | 🔄no slash command; the `deepcode upgrade` CLI subcommand prints an upgrade hint |
| `/upgrade` | ✓ | | prints version + `npm i -g deepcode-cli@latest` (also the `deepcode upgrade` subcommand) |
| `/pr_comments` | ✓ | ✓ | ✅ — `gh pr view` comments for the current branch's PR |
| `/review` | ✓ | ✗ (skill avail) | 🟡 — via Skill tool |
| `/security-review` | ✓ | ✗ (skill avail) | 🟡 — via Skill tool |
Expand All @@ -66,7 +66,7 @@ Legend: `✅` matches · `🟡` matches with caveats · `🔄` deferred · `⚠
| `/hooks` | ✓ | ✓ | ✅ — lists hooks configured in settings.json |
| `/skills` | ✓ | ✓ | ✅ — lists built-in + user + project skills |
| `/permissions` | ✓ | ✓ (read-only) | 🟡 — shows rules + default mode (interactive editor deferred) |
| `/privacy-settings` | ✓ | | 🔄 |
| `/privacy-settings` | ✓ | | ✅ — summarizes local data locations + what's sent to the DeepSeek API (read-only) |
| `/migrate-installer` | ✓ | ✗ | 🔄 |
| `/release-notes` | ✓ | ✓ | ✅ — prints the latest `CHANGELOG.md` entry |

Expand Down
Loading