@sayknow-cli/coding-agent 0.6.9 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/types/config/settings-schema.d.ts +3 -3
- package/dist/types/modes/components/welcome.d.ts +4 -19
- package/dist/types/modes/interactive-mode.d.ts +1 -6
- package/package.json +7 -7
- package/scripts/generate-sdk-operation-inventory.ts +2 -0
- package/src/config/settings-schema.ts +2 -1
- package/src/defaults/skc/extensions/grok-cli-vendor/src/models/catalog.ts +28 -0
- package/src/modes/components/sayknow-pet-widget.ts +1 -1
- package/src/modes/components/welcome.ts +14 -156
- package/src/modes/interactive-mode.ts +2 -21
- package/src/sdk/protocol/operation-inventory.generated.json +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.7.2] - 2026-09-29
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- The launch card is text-only: the wordmark starts at the left margin with model and workspace underneath. Removed its Sayo image, pixel/ASCII fallback, and idle dance after the mascot's kitty Unicode placeholders appeared as raw glyphs in a real terminal. The composer pet is unchanged.
|
|
10
|
+
|
|
11
|
+
## [0.7.1] - 2026-09-29
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Grok Build lists Grok 4.7 and Grok 4.7 Build Fast (both up to xhigh reasoning), which the Grok Build endpoint now serves; they were missing from the model picker because the Grok Build list is fixed in code.
|
|
16
|
+
|
|
17
|
+
## [0.7.0] - 2026-09-29
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- The pet is now Sayo, the Sayknow octopus. On kitty-graphics terminals (Ghostty, kitty, WezTerm) the composer pet is the Sayo image itself, one transformed image per pose: it tilts side to side when dancing, squashes on the "yay" beat, glances, blinks with drawn eyelids, and the blue pet cries real tears. The launch card shows Sayo as an image too (Ghostty and kitty outside tmux, through kitty Unicode placeholders, so the image scrolls and redraws with the text and dancing only changes a color). Sayo in orange is the new default and a third pet (`/pet`, `pet.mode: orange`); red and blue are hue shifts of the same image. Sixel terminals, tmux launch cards and plain text keep the pixel octopus, now also in orange. Pet frames are sent zlib-compressed.
|
|
22
|
+
|
|
5
23
|
## [0.6.9] - 2026-09-29
|
|
6
24
|
|
|
7
25
|
### Changed
|
|
@@ -653,18 +653,18 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
653
653
|
};
|
|
654
654
|
readonly "pet.mode": {
|
|
655
655
|
readonly type: "enum";
|
|
656
|
-
readonly values: readonly ["off", "red", "blue"];
|
|
656
|
+
readonly values: readonly ["off", "orange", "red", "blue"];
|
|
657
657
|
readonly default: "off";
|
|
658
658
|
readonly ui: {
|
|
659
659
|
readonly tab: "appearance";
|
|
660
660
|
readonly label: "Sayknow Pet";
|
|
661
|
-
readonly description: "
|
|
661
|
+
readonly description: "Sayo the octopus beside the composer (kitty-graphics terminals draw the full image; sixel terminals a pixel version)";
|
|
662
662
|
readonly options: readonly [{
|
|
663
663
|
readonly value: "off";
|
|
664
664
|
readonly label: "Off";
|
|
665
665
|
readonly description: "No pet";
|
|
666
666
|
}, ...{
|
|
667
|
-
value: "red" | "blue";
|
|
667
|
+
value: "orange" | "red" | "blue";
|
|
668
668
|
label: string;
|
|
669
669
|
description: string;
|
|
670
670
|
}[]];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@sayknow-cli/agent-core";
|
|
2
|
-
import { type Component
|
|
2
|
+
import { type Component } from "@sayknow-cli/tui";
|
|
3
3
|
import { type KeyDisplayContext } from "../../config/keybindings";
|
|
4
4
|
export interface RecentSession {
|
|
5
5
|
name: string;
|
|
@@ -39,22 +39,12 @@ export interface WelcomeComponentOptions {
|
|
|
39
39
|
resumeKey?: string;
|
|
40
40
|
/** Key bound to `app.session.continue`, which resumes the first session on the card. */
|
|
41
41
|
continueKey?: string;
|
|
42
|
-
/** Which Sayknow pet stands on the card (default red). */
|
|
43
|
-
petSkin?: PetSkinId;
|
|
44
42
|
/** Called when a session row is opened by click or Enter. */
|
|
45
43
|
onOpenSession?: (session: RecentSession) => void;
|
|
46
|
-
/**
|
|
47
|
-
* Whether a line of this card is on screen right now. When given, the pet keeps
|
|
48
|
-
* dancing after the intro for as long as its top row is visible, and stops for good
|
|
49
|
-
* once it scrolls away (changing a line above the viewport forces a full redraw).
|
|
50
|
-
*/
|
|
51
|
-
isLineVisible?: (line: number) => boolean;
|
|
52
44
|
}
|
|
53
45
|
/**
|
|
54
|
-
* Sayknow-CLI launch card: the wordmark
|
|
55
|
-
*
|
|
56
|
-
* the three most recent sessions — which can be opened from the card with a click or
|
|
57
|
-
* ↓ then Enter — and a single row of keys.
|
|
46
|
+
* Sayknow-CLI launch card: the wordmark, model and workspace, release note,
|
|
47
|
+
* recent sessions and shortcuts. The composer pet does not appear on this card.
|
|
58
48
|
*/
|
|
59
49
|
export declare class WelcomeComponent implements Component {
|
|
60
50
|
#private;
|
|
@@ -66,13 +56,8 @@ export declare class WelcomeComponent implements Component {
|
|
|
66
56
|
private readonly options;
|
|
67
57
|
constructor(version: string, modelName: string, providerName: string, recentSessions?: RecentSession[], logoMode?: WelcomeLogoMode, options?: WelcomeComponentOptions);
|
|
68
58
|
invalidate(): void;
|
|
69
|
-
/**
|
|
70
|
-
* Play the short launch intro. Content is fully readable from the first frame;
|
|
71
|
-
* only color and the tentacles move. Safe to call again — it restarts.
|
|
72
|
-
*/
|
|
59
|
+
/** Briefly reveal section colors without moving the card's content. */
|
|
73
60
|
playIntro(requestRender: () => void): void;
|
|
74
|
-
/** True while the pet is dancing after the intro. */
|
|
75
|
-
get dancing(): boolean;
|
|
76
61
|
dispose(): void;
|
|
77
62
|
setModel(modelName: string, providerName: string): void;
|
|
78
63
|
setRecentSessions(sessions: RecentSession[]): void;
|
|
@@ -22,7 +22,7 @@ import type { EvalExecutionComponent } from "./components/eval-execution";
|
|
|
22
22
|
import type { HookEditorComponent } from "./components/hook-editor";
|
|
23
23
|
import type { HookInputComponent } from "./components/hook-input";
|
|
24
24
|
import type { HookSelectorComponent } from "./components/hook-selector";
|
|
25
|
-
import { type PetMode,
|
|
25
|
+
import { type PetMode, SayknowPetWidget } from "./components/sayknow-pet-widget";
|
|
26
26
|
import type { ToolExecutionHandle } from "./components/tool-execution";
|
|
27
27
|
import { StatusLineComponent } from "./components/tool-status-header";
|
|
28
28
|
import { type WelcomeLogoMode } from "./components/welcome";
|
|
@@ -41,11 +41,6 @@ export declare function getComposerPlaceholder(keybindings: Pick<KeybindingsMana
|
|
|
41
41
|
readonly busyPromptMode: "steer" | "queue";
|
|
42
42
|
}): string;
|
|
43
43
|
export declare function getWelcomeTranscriptReservedRows(chatContainer: Container, width: number): number;
|
|
44
|
-
/**
|
|
45
|
-
* The pet on the launch card: the one the user keeps beside the composer, or —
|
|
46
|
-
* with the pet off — the skin that matches the theme (blue for blue-octopus).
|
|
47
|
-
*/
|
|
48
|
-
export declare function resolveWelcomePetSkin(petMode: PetMode, themeName: string | undefined): PetSkinId;
|
|
49
44
|
export declare function configureDefaultComposerChrome(editor: CustomEditor): void;
|
|
50
45
|
export type WelcomeBannerSettingMode = "auto" | "unicode" | "square" | "ascii";
|
|
51
46
|
export declare function resolveWelcomeLogoMode(mode: WelcomeBannerSettingMode, env?: Record<string, string | undefined>, platform?: NodeJS.Platform): WelcomeLogoMode;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@sayknow-cli/coding-agent",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.2",
|
|
5
5
|
"description": "Sayknow-CLI CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://sayknow-cli.com",
|
|
7
7
|
"author": "jaybeyond",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
55
55
|
"@babel/parser": "^7.29.3",
|
|
56
56
|
"@mozilla/readability": "^0.6.0",
|
|
57
|
-
"@sayknow-cli/stats": "0.
|
|
58
|
-
"@sayknow-cli/agent-core": "0.
|
|
59
|
-
"@sayknow-cli/ai": "0.
|
|
60
|
-
"@sayknow-cli/natives": "0.
|
|
61
|
-
"@sayknow-cli/tui": "0.
|
|
62
|
-
"@sayknow-cli/utils": "0.
|
|
57
|
+
"@sayknow-cli/stats": "0.7.2",
|
|
58
|
+
"@sayknow-cli/agent-core": "0.7.2",
|
|
59
|
+
"@sayknow-cli/ai": "0.7.2",
|
|
60
|
+
"@sayknow-cli/natives": "0.7.2",
|
|
61
|
+
"@sayknow-cli/tui": "0.7.2",
|
|
62
|
+
"@sayknow-cli/utils": "0.7.2",
|
|
63
63
|
"@puppeteer/browsers": "^2.13.0",
|
|
64
64
|
"@types/turndown": "5.0.6",
|
|
65
65
|
"@xterm/headless": "^6.0.0",
|
|
@@ -11,6 +11,8 @@ const inventoryPath = process.env.SKC_SDK_OPERATION_INVENTORY
|
|
|
11
11
|
|
|
12
12
|
/** Reviewed seams deliberately excluded from the public SDK operation surface. */
|
|
13
13
|
const LOCKED_EXCLUSIONS: Readonly<Record<string, string>> = {
|
|
14
|
+
"agent_session:getAutoCompactionThresholdTokens":
|
|
15
|
+
"internal compaction-threshold accessor feeding the /context breakdown; exposed through context.get, not an independent SDK operation",
|
|
14
16
|
"slash_command:settings": "visual/local-only command, not a user-facing SDK control seam",
|
|
15
17
|
"slash_command:theme": "visual/local-only command, not a user-facing SDK control seam",
|
|
16
18
|
"slash_command:copy": "visual/local-only command, not a user-facing SDK control seam",
|
|
@@ -680,7 +680,8 @@ export const SETTINGS_SCHEMA = {
|
|
|
680
680
|
ui: {
|
|
681
681
|
tab: "appearance",
|
|
682
682
|
label: "Sayknow Pet",
|
|
683
|
-
description:
|
|
683
|
+
description:
|
|
684
|
+
"Sayo the octopus beside the composer (kitty-graphics terminals draw the full image; sixel terminals a pixel version)",
|
|
684
685
|
options: [
|
|
685
686
|
{ value: "off", label: "Off", description: "No pet" },
|
|
686
687
|
...PET_SKIN_IDS.map(id => ({
|
|
@@ -11,6 +11,8 @@ const COST_43 = { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 };
|
|
|
11
11
|
const COST_45 = { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 };
|
|
12
12
|
const COST_46 = { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 };
|
|
13
13
|
const COST_420 = { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 };
|
|
14
|
+
// Same as direct xAI grok-4.7 (packages/ai models.json).
|
|
15
|
+
const COST_47 = { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 };
|
|
14
16
|
|
|
15
17
|
// ─── Model type ───────────────────────────────────────────────────────────────
|
|
16
18
|
|
|
@@ -39,6 +41,30 @@ export interface GrokCliModelConfig {
|
|
|
39
41
|
// the actual traffic captured through cli-chat-proxy.grok.com.
|
|
40
42
|
|
|
41
43
|
const FALLBACK_MODELS: GrokCliModelConfig[] = [
|
|
44
|
+
{
|
|
45
|
+
// Served by cli-chat-proxy.grok.com/v1/models (checked 2026-09-29): grok-4.7,
|
|
46
|
+
// grok-4.7-build-fast, grok-4.6, grok-4.5. Metadata as direct xAI grok-4.7.
|
|
47
|
+
id: 'grok-4.7',
|
|
48
|
+
name: 'Grok 4.7',
|
|
49
|
+
reasoning: true,
|
|
50
|
+
input: ['text', 'image'],
|
|
51
|
+
cost: COST_47,
|
|
52
|
+
contextWindow: 500_000,
|
|
53
|
+
maxTokens: 30_000,
|
|
54
|
+
maxReasoningEffort: Effort.XHigh,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
// The Grok Build fast variant of 4.7. xAI publishes no separate price or window;
|
|
58
|
+
// it is listed with grok-4.7's.
|
|
59
|
+
id: 'grok-4.7-build-fast',
|
|
60
|
+
name: 'Grok 4.7 Build Fast',
|
|
61
|
+
reasoning: true,
|
|
62
|
+
input: ['text', 'image'],
|
|
63
|
+
cost: COST_47,
|
|
64
|
+
contextWindow: 500_000,
|
|
65
|
+
maxTokens: 30_000,
|
|
66
|
+
maxReasoningEffort: Effort.XHigh,
|
|
67
|
+
},
|
|
42
68
|
{
|
|
43
69
|
id: 'grok-composer-2.5-fast',
|
|
44
70
|
name: 'Composer 2.5 Fast (Grok CLI)',
|
|
@@ -140,6 +166,7 @@ const FALLBACK_MODELS: GrokCliModelConfig[] = [
|
|
|
140
166
|
const MODEL_ALIASES: Readonly<Record<string, string>> = {
|
|
141
167
|
'grok-4.5-latest': 'grok-4.5',
|
|
142
168
|
'grok-4.6-latest': 'grok-4.6',
|
|
169
|
+
'grok-4.7-latest': 'grok-4.7',
|
|
143
170
|
'grok-build-latest': 'grok-4.5',
|
|
144
171
|
};
|
|
145
172
|
|
|
@@ -166,6 +193,7 @@ const EFFORT_CAPABLE_PREFIXES = [
|
|
|
166
193
|
'grok-4.3',
|
|
167
194
|
'grok-4.5',
|
|
168
195
|
'grok-4.6',
|
|
196
|
+
'grok-4.7',
|
|
169
197
|
];
|
|
170
198
|
|
|
171
199
|
export function supportsReasoningEffort(modelId: string): boolean {
|
|
@@ -275,7 +275,7 @@ export class SayknowPetWidget {
|
|
|
275
275
|
const cell = getCellDimensions();
|
|
276
276
|
this.#builtCellW = cell.widthPx;
|
|
277
277
|
this.#builtCellH = cell.heightPx;
|
|
278
|
-
const skin: PetSkinId = this.#mode === "off" ? "
|
|
278
|
+
const skin: PetSkinId = this.#mode === "off" ? "orange" : this.#mode;
|
|
279
279
|
if (protocol === "kitty") {
|
|
280
280
|
this.#kittyImageId ??= allocatePetKittyImageId();
|
|
281
281
|
this.#kittyCleanupPending = true;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@sayknow-cli/agent-core";
|
|
2
|
-
import {
|
|
3
|
-
type Component,
|
|
4
|
-
PARA_PARA_STEPS,
|
|
5
|
-
type PetSkinId,
|
|
6
|
-
padding,
|
|
7
|
-
renderPetHalfBlocks,
|
|
8
|
-
type SayknowPixelFrameName,
|
|
9
|
-
truncateToWidth,
|
|
10
|
-
visibleWidth,
|
|
11
|
-
} from "@sayknow-cli/tui";
|
|
2
|
+
import { type Component, padding, truncateToWidth, visibleWidth } from "@sayknow-cli/tui";
|
|
12
3
|
import { formatBuildLabel } from "../../build-metadata";
|
|
13
4
|
import { formatKeyHint, type KeyDisplayContext } from "../../config/keybindings";
|
|
14
5
|
import { type MsgKey, t } from "../../i18n";
|
|
@@ -50,23 +41,13 @@ export interface WelcomeComponentOptions {
|
|
|
50
41
|
resumeKey?: string;
|
|
51
42
|
/** Key bound to `app.session.continue`, which resumes the first session on the card. */
|
|
52
43
|
continueKey?: string;
|
|
53
|
-
/** Which Sayknow pet stands on the card (default red). */
|
|
54
|
-
petSkin?: PetSkinId;
|
|
55
44
|
/** Called when a session row is opened by click or Enter. */
|
|
56
45
|
onOpenSession?: (session: RecentSession) => void;
|
|
57
|
-
/**
|
|
58
|
-
* Whether a line of this card is on screen right now. When given, the pet keeps
|
|
59
|
-
* dancing after the intro for as long as its top row is visible, and stops for good
|
|
60
|
-
* once it scrolls away (changing a line above the viewport forces a full redraw).
|
|
61
|
-
*/
|
|
62
|
-
isLineVisible?: (line: number) => boolean;
|
|
63
46
|
}
|
|
64
47
|
|
|
65
48
|
/** Left margin of the card, and the widest the card grows on wide terminals. */
|
|
66
49
|
const MARGIN = 2;
|
|
67
50
|
const MAX_CARD_WIDTH = 76;
|
|
68
|
-
/** Gap between the pet and the wordmark. */
|
|
69
|
-
const MARK_GAP = 3;
|
|
70
51
|
/** Recent sessions on the card; the resume picker has the rest. */
|
|
71
52
|
const SESSION_ROWS = 3;
|
|
72
53
|
|
|
@@ -83,21 +64,9 @@ const WORDMARK: ReadonlyArray<readonly [string, string]> = [
|
|
|
83
64
|
const WORDMARK_GAP = 2;
|
|
84
65
|
const WORDMARK_WIDTH = 21 + WORDMARK_GAP + 7;
|
|
85
66
|
|
|
86
|
-
/** ASCII-safe stand-in for the pet when the banner must avoid block glyphs. */
|
|
87
|
-
const MARK_ASCII = [" .--. ", "( oo )", " ) ( ", "/\\/\\/\\"] as const;
|
|
88
|
-
const MARK_ASCII_WAVE = "\\/\\/\\/";
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Intro: the pet does a short para-para (tentacles sway left, right, left) and
|
|
92
|
-
* lands on its resting pose while color spreads down the card.
|
|
93
|
-
*/
|
|
94
|
-
const INTRO_POSES: readonly SayknowPixelFrameName[] = ["danceL", "danceR", "danceL", "base"];
|
|
95
67
|
const SECTION_STAGGER_MS = 55;
|
|
96
68
|
const SECTION_SETTLE_MS = 90;
|
|
97
|
-
const
|
|
98
|
-
const INTRO_MS = INTRO_POSES.length * WAVE_STEP_MS;
|
|
99
|
-
/** After the intro the pet does the composer pet's working dance, on loop. */
|
|
100
|
-
const DANCE_LOOP_MS = PARA_PARA_STEPS.reduce((sum, [, ms]) => sum + ms, 0);
|
|
69
|
+
const INTRO_MS = SECTION_SETTLE_MS + 4 * SECTION_STAGGER_MS;
|
|
101
70
|
|
|
102
71
|
/** A block of rows that takes its colors together during the intro. */
|
|
103
72
|
interface Section {
|
|
@@ -109,18 +78,12 @@ interface Section {
|
|
|
109
78
|
}
|
|
110
79
|
|
|
111
80
|
/**
|
|
112
|
-
* Sayknow-CLI launch card: the wordmark
|
|
113
|
-
*
|
|
114
|
-
* the three most recent sessions — which can be opened from the card with a click or
|
|
115
|
-
* ↓ then Enter — and a single row of keys.
|
|
81
|
+
* Sayknow-CLI launch card: the wordmark, model and workspace, release note,
|
|
82
|
+
* recent sessions and shortcuts. The composer pet does not appear on this card.
|
|
116
83
|
*/
|
|
117
84
|
export class WelcomeComponent implements Component {
|
|
118
85
|
#animStart: number | null = null;
|
|
119
86
|
#animTimer: NodeJS.Timeout | null = null;
|
|
120
|
-
#danceStart: number | null = null;
|
|
121
|
-
#danceTimer: NodeJS.Timeout | null = null;
|
|
122
|
-
/** Card line holding the pet's top row in the last frame; undefined when no pet is drawn. */
|
|
123
|
-
#markLine: number | undefined;
|
|
124
87
|
#snapshot: WelcomeSnapshot;
|
|
125
88
|
/** Highlighted session row while picking with the keyboard; undefined when not picking. */
|
|
126
89
|
#selected: number | undefined;
|
|
@@ -141,10 +104,7 @@ export class WelcomeComponent implements Component {
|
|
|
141
104
|
|
|
142
105
|
invalidate(): void {}
|
|
143
106
|
|
|
144
|
-
/**
|
|
145
|
-
* Play the short launch intro. Content is fully readable from the first frame;
|
|
146
|
-
* only color and the tentacles move. Safe to call again — it restarts.
|
|
147
|
-
*/
|
|
107
|
+
/** Briefly reveal section colors without moving the card's content. */
|
|
148
108
|
playIntro(requestRender: () => void): void {
|
|
149
109
|
this.#stopAnimation();
|
|
150
110
|
if (this.options.skipLogoAnimation) {
|
|
@@ -155,72 +115,14 @@ export class WelcomeComponent implements Component {
|
|
|
155
115
|
requestRender();
|
|
156
116
|
this.#animTimer = setInterval(() => {
|
|
157
117
|
const elapsed = performance.now() - (this.#animStart ?? 0);
|
|
158
|
-
if (elapsed >= INTRO_MS)
|
|
159
|
-
this.#stopAnimation();
|
|
160
|
-
this.#startDance(requestRender);
|
|
161
|
-
}
|
|
118
|
+
if (elapsed >= INTRO_MS) this.#stopAnimation();
|
|
162
119
|
requestRender();
|
|
163
120
|
}, INTRO_TICK_MS);
|
|
164
121
|
this.#animTimer.unref?.();
|
|
165
122
|
}
|
|
166
123
|
|
|
167
|
-
/** True while the pet is dancing after the intro. */
|
|
168
|
-
get dancing(): boolean {
|
|
169
|
-
return this.#danceTimer !== null;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Loop the working dance while the pet is on screen. Timers land on frame changes
|
|
174
|
-
* only (five per 1.6 s loop), so an idle card costs a handful of renders per second.
|
|
175
|
-
*/
|
|
176
|
-
#startDance(requestRender: () => void): void {
|
|
177
|
-
if (!this.options.isLineVisible || this.#markLine === undefined) return;
|
|
178
|
-
this.#danceStart = performance.now();
|
|
179
|
-
const next = (): void => {
|
|
180
|
-
if (this.#markLine === undefined || !this.options.isLineVisible?.(this.#markLine)) {
|
|
181
|
-
this.#stopDance();
|
|
182
|
-
requestRender();
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
requestRender();
|
|
186
|
-
this.#danceTimer = setTimeout(next, this.#msToNextDanceFrame());
|
|
187
|
-
this.#danceTimer.unref?.();
|
|
188
|
-
};
|
|
189
|
-
this.#danceTimer = setTimeout(next, this.#msToNextDanceFrame());
|
|
190
|
-
this.#danceTimer.unref?.();
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
#stopDance(): void {
|
|
194
|
-
if (this.#danceTimer !== null) clearTimeout(this.#danceTimer);
|
|
195
|
-
this.#danceTimer = null;
|
|
196
|
-
this.#danceStart = null;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
#danceOffset(): number {
|
|
200
|
-
return this.#danceStart === null ? 0 : (performance.now() - this.#danceStart) % DANCE_LOOP_MS;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
#msToNextDanceFrame(): number {
|
|
204
|
-
let t = this.#danceOffset();
|
|
205
|
-
for (const [, ms] of PARA_PARA_STEPS) {
|
|
206
|
-
if (t < ms) return Math.max(16, ms - t);
|
|
207
|
-
t -= ms;
|
|
208
|
-
}
|
|
209
|
-
return 16;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
#dancePose(): SayknowPixelFrameName {
|
|
213
|
-
let t = this.#danceOffset();
|
|
214
|
-
for (const [frame, ms] of PARA_PARA_STEPS) {
|
|
215
|
-
if (t < ms) return frame;
|
|
216
|
-
t -= ms;
|
|
217
|
-
}
|
|
218
|
-
return "base";
|
|
219
|
-
}
|
|
220
|
-
|
|
221
124
|
dispose(): void {
|
|
222
125
|
this.#stopAnimation();
|
|
223
|
-
this.#stopDance();
|
|
224
126
|
}
|
|
225
127
|
|
|
226
128
|
#stopAnimation(): void {
|
|
@@ -318,14 +220,13 @@ export class WelcomeComponent implements Component {
|
|
|
318
220
|
|
|
319
221
|
render(termWidth: number): string[] {
|
|
320
222
|
this.#lineSessions = [];
|
|
321
|
-
this.#markLine = undefined;
|
|
322
223
|
const gutterWidth = this.#rightGutterWidth(termWidth);
|
|
323
224
|
const width = Math.max(0, termWidth - gutterWidth);
|
|
324
225
|
if (width < 4) return [];
|
|
325
226
|
|
|
326
227
|
const targetRows = this.#targetRows(termWidth);
|
|
327
228
|
if (targetRows !== undefined && targetRows <= 0) return [];
|
|
328
|
-
if (targetRows === 1) return this.#withRightGutter([this.#fit(this.#titleLine(
|
|
229
|
+
if (targetRows === 1) return this.#withRightGutter([this.#fit(this.#titleLine(), width)], gutterWidth);
|
|
329
230
|
|
|
330
231
|
const cardWidth = Math.max(1, Math.min(MAX_CARD_WIDTH, width - MARGIN));
|
|
331
232
|
const sections = this.#sections(cardWidth);
|
|
@@ -392,44 +293,23 @@ export class WelcomeComponent implements Component {
|
|
|
392
293
|
return { identity: this.#identityLines(cardWidth), others };
|
|
393
294
|
}
|
|
394
295
|
|
|
395
|
-
// ── Identity:
|
|
296
|
+
// ── Identity: wordmark, model and workspace ───────────────────────────────
|
|
396
297
|
|
|
397
298
|
#identityLines(cardWidth: number): string[] {
|
|
398
|
-
const mark = this.#markRows();
|
|
399
|
-
const markWidth = Math.max(0, ...mark.map(row => visibleWidth(row)));
|
|
400
|
-
const withMark = cardWidth >= markWidth + MARK_GAP + WORDMARK_WIDTH;
|
|
401
|
-
// The card opens with one blank row, so the pet's top row is card line 1.
|
|
402
|
-
this.#markLine = withMark ? 1 : undefined;
|
|
403
299
|
const withWordmark = this.logoMode !== "ascii" && cardWidth >= WORDMARK_WIDTH;
|
|
404
|
-
const
|
|
405
|
-
const infoWidth = Math.max(1, cardWidth - indent);
|
|
406
|
-
|
|
407
|
-
const head: string[] = withWordmark
|
|
300
|
+
const head = withWordmark
|
|
408
301
|
? WORDMARK.map(
|
|
409
302
|
([word, suffix]) =>
|
|
410
303
|
`${theme.bold(theme.fg("accent", word))}${padding(WORDMARK_GAP)}${theme.fg("text", suffix)}`,
|
|
411
304
|
)
|
|
412
|
-
: [this.#truncate(this.#titleLine(
|
|
305
|
+
: [this.#truncate(this.#titleLine(), cardWidth)];
|
|
413
306
|
const versionLine = this.#spread(
|
|
414
307
|
theme.fg("muted", t("welcome.tagline")),
|
|
415
308
|
theme.fg("dim", this.#versionLabel()),
|
|
416
|
-
|
|
309
|
+
cardWidth,
|
|
417
310
|
);
|
|
418
311
|
const info = [...head, withWordmark ? versionLine : theme.fg("muted", t("welcome.tagline"))];
|
|
419
|
-
|
|
420
|
-
// Model and place sit under the wordmark, in the same column — starting beside the
|
|
421
|
-
// pet's last rows when the pet is taller than the wordmark, so no blank row opens.
|
|
422
|
-
const text = [...info, ...this.#statusLines(infoWidth)];
|
|
423
|
-
const rows: string[] = [];
|
|
424
|
-
if (withMark) {
|
|
425
|
-
const count = Math.max(mark.length, text.length);
|
|
426
|
-
for (let row = 0; row < count; row++) {
|
|
427
|
-
const art = mark[row] ?? padding(markWidth);
|
|
428
|
-
const line = text[row] ?? "";
|
|
429
|
-
rows.push(line ? `${art}${padding(MARK_GAP)}${line}` : art);
|
|
430
|
-
}
|
|
431
|
-
} else rows.push(...text);
|
|
432
|
-
return rows;
|
|
312
|
+
return [...info, ...this.#statusLines(cardWidth)];
|
|
433
313
|
}
|
|
434
314
|
|
|
435
315
|
#versionLabel(): string {
|
|
@@ -437,31 +317,9 @@ export class WelcomeComponent implements Component {
|
|
|
437
317
|
return `v${this.version} · ${buildLabel}`;
|
|
438
318
|
}
|
|
439
319
|
|
|
440
|
-
/** The Sayknow pet (its own sprite at three quarters size), in half blocks; the pose follows the intro. */
|
|
441
|
-
#markRows(): string[] {
|
|
442
|
-
const step = this.#animStart == null ? -1 : Math.floor((performance.now() - this.#animStart) / WAVE_STEP_MS);
|
|
443
|
-
if (this.logoMode === "ascii") {
|
|
444
|
-
const rows: string[] = [...MARK_ASCII];
|
|
445
|
-
const wave =
|
|
446
|
-
step >= 0
|
|
447
|
-
? step < INTRO_POSES.length - 1 && step % 2 === 1
|
|
448
|
-
: this.#danceStart !== null && this.#dancePose() === "danceR";
|
|
449
|
-
if (wave) rows[3] = MARK_ASCII_WAVE;
|
|
450
|
-
return rows.map(row => theme.fg("accent", row));
|
|
451
|
-
}
|
|
452
|
-
const pose =
|
|
453
|
-
step >= 0 && step < INTRO_POSES.length
|
|
454
|
-
? INTRO_POSES[step]!
|
|
455
|
-
: this.#danceStart !== null
|
|
456
|
-
? this.#dancePose()
|
|
457
|
-
: "base";
|
|
458
|
-
return renderPetHalfBlocks(pose, this.options.petSkin ?? "red", theme.getColorMode(), { scale: "compact" });
|
|
459
|
-
}
|
|
460
|
-
|
|
461
320
|
/** One-line title for layouts without room for the wordmark. */
|
|
462
|
-
#titleLine(
|
|
463
|
-
|
|
464
|
-
return `${mark}${theme.bold(theme.fg("accent", "Sayknow-CLI"))}${theme.fg("dim", ` ${this.#versionLabel()}`)}`;
|
|
321
|
+
#titleLine(): string {
|
|
322
|
+
return `${theme.bold(theme.fg("accent", "Sayknow-CLI"))}${theme.fg("dim", ` ${this.#versionLabel()}`)}`;
|
|
465
323
|
}
|
|
466
324
|
|
|
467
325
|
/**
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
isPetCapabilityProbePending,
|
|
74
74
|
warnWhenPetCapabilitySettled,
|
|
75
75
|
} from "./components/pet-capability";
|
|
76
|
-
import { type PetMode,
|
|
76
|
+
import { type PetMode, SayknowPetWidget } from "./components/sayknow-pet-widget";
|
|
77
77
|
import { resolveCurrentBranch } from "./components/status-line/git-utils";
|
|
78
78
|
import type { ToolExecutionHandle } from "./components/tool-execution";
|
|
79
79
|
import { StatusLineComponent } from "./components/tool-status-header";
|
|
@@ -101,14 +101,7 @@ import { shouldShowExtensionCommand } from "./slash-command-visibility";
|
|
|
101
101
|
import { TasksAggregator } from "./tasks-aggregator";
|
|
102
102
|
import { type ShimmerPalette, shimmerSegments, shimmerText } from "./theme/shimmer";
|
|
103
103
|
import type { Theme } from "./theme/theme";
|
|
104
|
-
import {
|
|
105
|
-
getCurrentThemeName,
|
|
106
|
-
getEditorTheme,
|
|
107
|
-
getSymbolTheme,
|
|
108
|
-
onTerminalAppearanceChange,
|
|
109
|
-
onThemeChange,
|
|
110
|
-
theme,
|
|
111
|
-
} from "./theme/theme";
|
|
104
|
+
import { getEditorTheme, getSymbolTheme, onTerminalAppearanceChange, onThemeChange, theme } from "./theme/theme";
|
|
112
105
|
import { type RegisterTranscriptItem, TranscriptItemRegistry, transcriptItemId } from "./transcript-item-registry";
|
|
113
106
|
import {
|
|
114
107
|
type CompactionQueuedMessage,
|
|
@@ -212,15 +205,6 @@ function getShellInputPrefix(isNoContext: boolean): string {
|
|
|
212
205
|
return `${shellLabel} `;
|
|
213
206
|
}
|
|
214
207
|
|
|
215
|
-
/**
|
|
216
|
-
* The pet on the launch card: the one the user keeps beside the composer, or —
|
|
217
|
-
* with the pet off — the skin that matches the theme (blue for blue-octopus).
|
|
218
|
-
*/
|
|
219
|
-
export function resolveWelcomePetSkin(petMode: PetMode, themeName: string | undefined): PetSkinId {
|
|
220
|
-
if (petMode !== "off") return petMode;
|
|
221
|
-
return themeName?.startsWith("blue") ? "blue" : "red";
|
|
222
|
-
}
|
|
223
|
-
|
|
224
208
|
/**
|
|
225
209
|
* The composer is an open rail, not a box: every input row starts with the same
|
|
226
210
|
* rail glyph a submitted prompt keeps in the transcript, colored by the editor's
|
|
@@ -787,10 +771,7 @@ export class InteractiveMode implements InteractiveModeContext {
|
|
|
787
771
|
snapshot: this.#buildWelcomeSnapshot(),
|
|
788
772
|
resumeKey: this.keybindings.getKeys("app.session.resume")[0],
|
|
789
773
|
continueKey: this.keybindings.getKeys("app.session.continue")[0],
|
|
790
|
-
petSkin: resolveWelcomePetSkin(settings.get("pet.mode"), getCurrentThemeName()),
|
|
791
774
|
onOpenSession: session => void this.#openWelcomeSession(session),
|
|
792
|
-
isLineVisible: line =>
|
|
793
|
-
this.#welcomeComponent !== undefined && this.ui.isChildLineVisible(this.#welcomeComponent, line),
|
|
794
775
|
},
|
|
795
776
|
);
|
|
796
777
|
|
|
@@ -4288,6 +4288,17 @@
|
|
|
4288
4288
|
"packages/coding-agent/test/sdk-operation-inventory.test.ts"
|
|
4289
4289
|
]
|
|
4290
4290
|
},
|
|
4291
|
+
{
|
|
4292
|
+
"sourceId": "agent_session:getAutoCompactionThresholdTokens",
|
|
4293
|
+
"sourceFile": "packages/coding-agent/src/session/agent-session.ts",
|
|
4294
|
+
"sourceKind": "agent_session",
|
|
4295
|
+
"decision": "exclude",
|
|
4296
|
+
"rationale": "internal compaction-threshold accessor feeding the /context breakdown; exposed through context.get, not an independent SDK operation",
|
|
4297
|
+
"exclusionMetadata": {
|
|
4298
|
+
"adapterMappings": "not_applicable",
|
|
4299
|
+
"testIds": "not_applicable"
|
|
4300
|
+
}
|
|
4301
|
+
},
|
|
4291
4302
|
{
|
|
4292
4303
|
"sourceId": "agent_session:compact",
|
|
4293
4304
|
"sourceFile": "packages/coding-agent/src/session/agent-session.ts",
|