@sayknow-cli/coding-agent 0.2.2 → 0.2.4

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.
@@ -29,6 +29,7 @@ import {
29
29
  type ScopedModelSelection,
30
30
  } from "../../config/model-resolver";
31
31
  import type { Settings } from "../../config/settings";
32
+ import { t } from "../../i18n";
32
33
  import { type ThemeColor, theme } from "../../modes/theme/theme";
33
34
  import { formatModelOnboardingInlineHint } from "../../setup/model-onboarding-guidance";
34
35
  import { formatClampedModelSelector, getThinkingLevelMetadata, parseThinkingLevel } from "../../thinking";
@@ -190,7 +191,7 @@ const PROFILE_ROLE_PREVIEW_ORDER: SkcModelAssignmentTargetId[] = [
190
191
  "critic",
191
192
  "architect",
192
193
  ];
193
- const PRESET_SCOPE_LABELS = ["Apply for this session", "Set as default"];
194
+ const presetScopeLabels = (): readonly string[] => [t("modelSelector.applySession"), t("modelSelector.setDefault")];
194
195
 
195
196
  function isPrintableCharacter(keyData: string): boolean {
196
197
  return keyData.length === 1 && keyData >= " " && keyData !== "\x7f";
@@ -290,8 +291,7 @@ export class ModelSelectorComponent extends Container {
290
291
  this.addChild(new Spacer(1));
291
292
 
292
293
  // Add hint about model filtering
293
- const hintText =
294
- scopedModels.length > 0 ? "Showing models from --models scope" : formatModelOnboardingInlineHint();
294
+ const hintText = scopedModels.length > 0 ? t("modelSelector.showingScoped") : formatModelOnboardingInlineHint();
295
295
  this.addChild(new Text(theme.fg("warning", hintText), 0, 0));
296
296
  this.addChild(new Spacer(1));
297
297
 
@@ -594,7 +594,7 @@ export class ModelSelectorComponent extends Container {
594
594
  this.#headerContainer.clear();
595
595
 
596
596
  const tabs: Tab[] = this.#providers.map(provider => ({ id: provider.id, label: provider.label }));
597
- const tabBar = new TabBar("Models", tabs, getTabBarTheme(), this.#activeTabIndex);
597
+ const tabBar = new TabBar(t("modelSelector.modelsTab"), tabs, getTabBarTheme(), this.#activeTabIndex);
598
598
  tabBar.onTabChange = (_tab, index) => {
599
599
  this.#activeTabIndex = index;
600
600
  this.#selectedIndex = 0;
@@ -830,19 +830,19 @@ export class ModelSelectorComponent extends Container {
830
830
  this.#headerContainer.clear();
831
831
  this.#tabBar = null;
832
832
  this.#listContainer.clear();
833
- this.#headerContainer.addChild(new Text(theme.fg("accent", "Model presets"), 0, 0));
833
+ this.#headerContainer.addChild(new Text(theme.fg("accent", t("modelSelector.presets")), 0, 0));
834
834
  const rows = this.#getPresetRows();
835
835
  for (let i = 0; i < rows.length; i++) {
836
836
  const row = rows[i];
837
837
  const selected = i === this.#presetCursor;
838
838
  const prefix = selected ? theme.fg("accent", `${theme.nav.cursor} `) : " ";
839
839
  if (row.kind === "create") {
840
- const label = "Create custom preset";
840
+ const label = t("modelSelector.createCustom");
841
841
  this.#listContainer.addChild(new Text(`${prefix}${selected ? theme.fg("accent", label) : label}`, 0, 0));
842
842
  continue;
843
843
  }
844
844
  if (row.kind === "browse") {
845
- const label = "Browse all models";
845
+ const label = t("modelSelector.browseAll");
846
846
  this.#listContainer.addChild(new Text(`${prefix}${selected ? theme.fg("accent", label) : label}`, 0, 0));
847
847
  continue;
848
848
  }
@@ -872,7 +872,14 @@ export class ModelSelectorComponent extends Container {
872
872
  #renderPresetPreview(profile: ModelProfileDefinition): void {
873
873
  this.#listContainer.addChild(new Spacer(1));
874
874
  this.#listContainer.addChild(
875
- new Text(theme.fg("muted", ` Preset preview: ${getModelProfilePresentation(profile).displayName}`), 0, 0),
875
+ new Text(
876
+ theme.fg(
877
+ "muted",
878
+ ` ${t("modelSelector.presetPreview", { name: getModelProfilePresentation(profile).displayName })}`,
879
+ ),
880
+ 0,
881
+ 0,
882
+ ),
876
883
  );
877
884
  for (const role of PROFILE_ROLE_PREVIEW_ORDER) {
878
885
  const selector = profile.modelMapping[role];
@@ -889,15 +896,15 @@ export class ModelSelectorComponent extends Container {
889
896
  }
890
897
  this.#listContainer.addChild(new Spacer(1));
891
898
  if (this.#presetScopeMenuOpen) {
892
- for (let i = 0; i < PRESET_SCOPE_LABELS.length; i++) {
893
- const label = PRESET_SCOPE_LABELS[i] ?? "";
899
+ for (let i = 0; i < presetScopeLabels().length; i++) {
900
+ const label = presetScopeLabels()[i] ?? "";
894
901
  const prefix = i === this.#presetScopeIndex ? theme.fg("accent", `${theme.nav.cursor} `) : " ";
895
902
  this.#listContainer.addChild(
896
903
  new Text(`${prefix}${i === this.#presetScopeIndex ? theme.fg("accent", label) : label}`, 0, 0),
897
904
  );
898
905
  }
899
906
  } else {
900
- this.#listContainer.addChild(new Text(theme.fg("muted", " Press Enter to apply this preset"), 0, 0));
907
+ this.#listContainer.addChild(new Text(theme.fg("muted", ` ${t("modelSelector.pressEnterApply")}`), 0, 0));
901
908
  }
902
909
  }
903
910
 
@@ -1050,7 +1057,10 @@ export class ModelSelectorComponent extends Container {
1050
1057
  const statusMessage = this.#getProviderEmptyStateMessage();
1051
1058
  this.#listContainer.addChild(
1052
1059
  new Text(
1053
- theme.fg("muted", statusMessage ?? ` No matching models. ${formatModelOnboardingInlineHint()}`),
1060
+ theme.fg(
1061
+ "muted",
1062
+ statusMessage ?? ` ${t("modelSelector.noMatching")} ${formatModelOnboardingInlineHint()}`,
1063
+ ),
1054
1064
  0,
1055
1065
  0,
1056
1066
  ),
@@ -1065,7 +1075,11 @@ export class ModelSelectorComponent extends Container {
1065
1075
  ? ` (${selected.model.provider}/${selected.model.id}, ${(selected as CanonicalModelItem).variantCount} variants)`
1066
1076
  : "";
1067
1077
  this.#listContainer.addChild(
1068
- new Text(theme.fg("muted", ` Model Name: ${selected.model.name}${suffix}`), 0, 0),
1078
+ new Text(
1079
+ theme.fg("muted", ` ${t("modelSelector.modelName", { value: selected.model.name })}${suffix}`),
1080
+ 0,
1081
+ 0,
1082
+ ),
1069
1083
  );
1070
1084
  if (this.#pendingThinkingChoice) {
1071
1085
  this.#renderThinkingMenu(this.#pendingThinkingChoice);
@@ -1077,7 +1091,9 @@ export class ModelSelectorComponent extends Container {
1077
1091
 
1078
1092
  #renderActionMenu(item: ModelItem | CanonicalModelItem): void {
1079
1093
  this.#listContainer.addChild(new Spacer(1));
1080
- this.#listContainer.addChild(new Text(theme.fg("muted", ` Action for: ${item.model.id}`), 0, 0));
1094
+ this.#listContainer.addChild(
1095
+ new Text(theme.fg("muted", ` ${t("modelSelector.actionFor", { id: item.model.id })}`), 0, 0),
1096
+ );
1081
1097
  this.#listContainer.addChild(new Spacer(1));
1082
1098
  const actionCount = this.#getActionCount(item.model);
1083
1099
  for (let i = 0; i < actionCount; i++) {
@@ -1091,10 +1107,18 @@ export class ModelSelectorComponent extends Container {
1091
1107
  }
1092
1108
 
1093
1109
  #renderThinkingMenu(choice: PendingThinkingChoice): void {
1094
- const targetLabel = choice.role === null ? "temporary model" : SKC_MODEL_ASSIGNMENT_TARGETS[choice.role].name;
1110
+ const targetLabel =
1111
+ choice.role === null ? t("modelSelector.temporaryModel") : SKC_MODEL_ASSIGNMENT_TARGETS[choice.role].name;
1095
1112
  this.#listContainer.addChild(new Spacer(1));
1096
1113
  this.#listContainer.addChild(
1097
- new Text(theme.fg("muted", ` Reasoning for ${targetLabel}: ${choice.item.model.id}`), 0, 0),
1114
+ new Text(
1115
+ theme.fg(
1116
+ "muted",
1117
+ ` ${t("modelSelector.reasoningFor", { target: targetLabel, id: choice.item.model.id })}`,
1118
+ ),
1119
+ 0,
1120
+ 0,
1121
+ ),
1098
1122
  );
1099
1123
  this.#listContainer.addChild(new Spacer(1));
1100
1124
  for (let i = 0; i < choice.levels.length; i++) {
@@ -1188,7 +1212,7 @@ export class ModelSelectorComponent extends Container {
1188
1212
  if (rows.length === 0) return;
1189
1213
  if (this.#presetScopeMenuOpen) {
1190
1214
  this.#presetScopeIndex =
1191
- this.#presetScopeIndex === 0 ? PRESET_SCOPE_LABELS.length - 1 : this.#presetScopeIndex - 1;
1215
+ this.#presetScopeIndex === 0 ? presetScopeLabels().length - 1 : this.#presetScopeIndex - 1;
1192
1216
  } else {
1193
1217
  this.#presetCursor = this.#presetCursor === 0 ? rows.length - 1 : this.#presetCursor - 1;
1194
1218
  this.#previewProfileName = undefined;
@@ -1202,7 +1226,7 @@ export class ModelSelectorComponent extends Container {
1202
1226
  const rows = this.#getPresetRows();
1203
1227
  if (rows.length === 0) return;
1204
1228
  if (this.#presetScopeMenuOpen) {
1205
- this.#presetScopeIndex = (this.#presetScopeIndex + 1) % PRESET_SCOPE_LABELS.length;
1229
+ this.#presetScopeIndex = (this.#presetScopeIndex + 1) % presetScopeLabels().length;
1206
1230
  } else {
1207
1231
  this.#presetCursor = (this.#presetCursor + 1) % rows.length;
1208
1232
  this.#previewProfileName = undefined;
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/jaybeyond/sayknow-cli/main/packages/coding-agent/theme-schema.json",
2
+ "$schema": "https://raw.githubusercontent.com/jaybeyond/Sayknow_CLI/main/packages/coding-agent/theme-schema.json",
3
3
  "name": "claude-code",
4
4
  "vars": {
5
5
  "bg": "#1a1a1a",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/jaybeyond/sayknow-cli/main/packages/coding-agent/theme-schema.json",
2
+ "$schema": "https://raw.githubusercontent.com/jaybeyond/Sayknow_CLI/main/packages/coding-agent/theme-schema.json",
3
3
  "name": "codex",
4
4
  "vars": {
5
5
  "bg": "#0f1115",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/jaybeyond/sayknow-cli/main/packages/coding-agent/theme-schema.json",
2
+ "$schema": "https://raw.githubusercontent.com/jaybeyond/Sayknow_CLI/main/packages/coding-agent/theme-schema.json",
3
3
  "name": "opencode",
4
4
  "vars": {
5
5
  "background": "#212121",
@@ -20,7 +20,7 @@ import { withFileLock } from "../config/file-lock";
20
20
  import { t } from "../i18n";
21
21
  import type { CustomMessage } from "../session/messages";
22
22
 
23
- export const STAR_REMINDER_REPO = "jaybeyond/sayknow-cli";
23
+ export const STAR_REMINDER_REPO = "jaybeyond/Sayknow_CLI";
24
24
  export const STAR_REMINDER_CUSTOM_TYPE = "star-reminder";
25
25
  export const STARRED_CACHE_TTL_MS = 24 * 60 * 60 * 1000;
26
26
 
@@ -101,7 +101,7 @@ export interface MCPSseServerConfig extends MCPServerConfigBase {
101
101
  export type MCPServerConfig = MCPStdioServerConfig | MCPHttpServerConfig | MCPSseServerConfig;
102
102
 
103
103
  export const MCP_CONFIG_SCHEMA_URL =
104
- "https://raw.githubusercontent.com/jaybeyond/sayknow-cli/main/packages/coding-agent/src/config/mcp-schema.json";
104
+ "https://raw.githubusercontent.com/jaybeyond/Sayknow_CLI/main/packages/coding-agent/src/config/mcp-schema.json";
105
105
 
106
106
  /** Root mcp.json/.mcp.json file structure */
107
107
  export interface MCPConfigFile {
@@ -277,7 +277,7 @@ export const handleDiscogs: SpecialHandler = async (
277
277
  signal,
278
278
  headers: {
279
279
  Accept: "application/json",
280
- "User-Agent": "CodingAgent/1.0 +https://github.com/jaybeyond/sayknow-cli",
280
+ "User-Agent": "CodingAgent/1.0 +https://github.com/jaybeyond/Sayknow_CLI",
281
281
  },
282
282
  });
283
283