@devries-cameron20 / t3code Mirror · read-only / commits / d3217c75f2
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 12:15 UTC

fix(provider-cursor): advertise manual compaction (#31203)

Co-authored-by: Yaroslav Litkovych <yaroslav.litkovych@tamara.co> Co-authored-by: Julius Marminge <julius0216@outlook.com>

Yaroslav committed Nov 15, 2026 at 03:38 UTC d3217c75f2693c9709222617edd632bd3b7e6c0a
2 files changed +20
packages/provider-cursor/src/server/status.test.ts
+17
@@ -7,11 +7,13 @@ import * as TestClock from "effect/testing/TestClock";
7 import type { CursorSettings } from "../settings.ts";
8 import { CursorSettings as CursorSettingsSchema } from "../settings.ts";
9 import { createModelCapabilities } from "@t3tools/shared/model";
10 +import { COMPACT_SLASH_COMMAND } from "@t3tools/provider-core/server/snapshotProbe";
11
12 import {
13 buildCursorCapabilitiesFromSdkModel,
14 buildCursorDiscoveredModelsFromSdk,
15 buildCursorProviderSnapshot,
16 + buildInitialCursorProviderSnapshot,
17 checkCursorProviderStatus,
18 } from "./status.ts";
19 import * as CursorSdkCatalog from "./CursorSdkCatalog.ts";
@@ -96,6 +98,19 @@ const sdkParameterizedModel = {
98 ],
99 } satisfies SDKModel;
100
101 +describe("buildInitialCursorProviderSnapshot", () => {
102 + it.effect.each([true, false])("advertises manual compaction only when enabled (%s)", (enabled) =>
103 + Effect.gen(function* () {
104 + const provider = yield* buildInitialCursorProviderSnapshot({
105 + ...baseCursorSettings,
106 + enabled,
107 + });
108 +
109 + expect(provider.slashCommands).toEqual(enabled ? [COMPACT_SLASH_COMMAND] : []);
110 + }),
111 + );
112 +});
113 +
114 describe("buildCursorProviderSnapshot", () => {
115 it("downgrades ready status to warning when SDK model discovery returns no models", () => {
116 expect(
@@ -113,6 +128,7 @@ describe("buildCursorProviderSnapshot", () => {
128 status: "warning",
129 message: "Cursor SDK model discovery returned no built-in models.",
130 models: [],
131 + slashCommands: [COMPACT_SLASH_COMMAND],
132 supportsConversationRollback: false,
133 });
134 });
@@ -196,6 +212,7 @@ describe("checkCursorProviderStatus", () => {
212
213 expect(provider).toMatchObject({
214 status: "ready",
215 + slashCommands: [COMPACT_SLASH_COMMAND],
216 auth: {
217 status: "authenticated",
218 type: "api-key",
packages/provider-cursor/src/server/status.ts
+3
@@ -19,6 +19,7 @@ import {
19 buildBooleanOptionDescriptor,
20 buildSelectOptionDescriptor,
21 buildServerProvider,
22 + COMPACT_SLASH_COMMAND,
23 providerModelsFromSettings,
24 type ServerProviderDraft,
25 } from "@t3tools/provider-core/server/snapshotProbe";
@@ -62,6 +63,7 @@ export const buildInitialCursorProviderSnapshot = Effect.fn(
63 enabled: true,
64 checkedAt,
65 models,
66 + slashCommands: [COMPACT_SLASH_COMMAND],
67 probe: {
68 installed: true,
69 version: null,
@@ -236,6 +238,7 @@ export function buildCursorProviderSnapshot(input: {
238 input.cursorSettings.customModels,
239 EMPTY_CAPABILITIES,
240 ),
241 + slashCommands: [COMPACT_SLASH_COMMAND],
242 probe: {
243 installed: true,
244 version: input.parsed.version,