@stemtrooper/learningcode 0.4.5 → 0.4.6

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/README.md CHANGED
@@ -1,4 +1,13 @@
1
- # learningcode
1
+ ```text
2
+ ██╗ ███████╗ █████╗ ██████╗ ███╗ ██╗██╗███╗ ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ███████╗
3
+ ██║ ██╔════╝██╔══██╗██╔══██╗████╗ ██║██║████╗ ██║██╔════╝ ██╔════╝██╔═══██╗██╔══██╗██╔════╝
4
+ ██║ █████╗ ███████║██████╔╝██╔██╗ ██║██║██╔██╗ ██║██║ ███╗██║ ██║ ██║██║ ██║█████╗
5
+ ██║ ██╔══╝ ██╔══██║██╔══██╗██║╚██╗██║██║██║╚██╗██║██║ ██║██║ ██║ ██║██║ ██║██╔══╝
6
+ ███████╗███████╗██║ ██║██║ ██║██║ ╚████║██║██║ ╚████║╚██████╔╝╚██████╗╚██████╔╝██████╔╝███████╗
7
+ ╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
8
+ ```
9
+
10
+ *The Learning Curve · Sarawak*
2
11
 
3
12
  A terminal coding agent for **The Learning Curve** students, running on TLC's own
4
13
  inference through **TLC-Spark**.
@@ -249,7 +258,7 @@ to Spark, and no telemetry is sent.
249
258
  learningcode --show-config # show resolved paths and settings
250
259
  learningcode --login # enter a new token
251
260
  learningcode --list-models # every reachable model
252
- learningcode --theme dark # use the upstream theme instead of TLC's
261
+ learningcode --use-theme dark # use the upstream theme instead of TLC's
253
262
  ```
254
263
 
255
264
  **Your edits are kept.** If you change the theme or the model configuration,
@@ -240,13 +240,22 @@ async function main() {
240
240
  const effectiveModel = requestedModel ?? `${PROVIDER_ID}/${MODEL_ID}`;
241
241
  if (!requestedModel) forced.push("--model", effectiveModel);
242
242
 
243
- // Default to the TLC theme, but never override an explicit choice: --theme on
244
- // the command line, or LEARNINGCODE_THEME in the environment.
243
+ // Default to the TLC theme without overriding an explicit CLI choice.
244
+ // LEARNINGCODE_THEME flows through preferredTheme(), so it becomes the
245
+ // forced value rather than suppressing it. NB: Pi's --theme loads a theme
246
+ // *file or directory*, while --use-theme selects a theme *by name*.
247
+ // Passing "tlc-dark" to --theme made Pi warn "[Theme conflicts] ...
248
+ // theme path does not exist" on every login, so the name goes to
249
+ // --use-theme.
245
250
  const userPickedTheme = toPi.some(
246
- (arg) => arg === "--theme" || arg.startsWith("--theme="),
251
+ (arg) =>
252
+ arg === "--theme" ||
253
+ arg.startsWith("--theme=") ||
254
+ arg === "--use-theme" ||
255
+ arg.startsWith("--use-theme="),
247
256
  );
248
- if (!userPickedTheme && !process.env.LEARNINGCODE_THEME) {
249
- forced.push("--theme", preferredTheme());
257
+ if (!userPickedTheme) {
258
+ forced.push("--use-theme", preferredTheme());
250
259
  }
251
260
 
252
261
  // Spark enforces one active generation per student, so subagents and parallel
package/lib/themes.mjs CHANGED
@@ -39,7 +39,7 @@ export function preferredTheme(env = process.env) {
39
39
  if (forced) return forced;
40
40
  // Windows Terminal defaults to a dark scheme for most profiles; macOS and
41
41
  // Linux terminals are more often light. This is a guess either way, which is
42
- // why an explicit --theme still wins.
42
+ // why an explicit --use-theme still wins.
43
43
  return env.LEARNINGCODE_LIGHT_THEME === "1" ? "tlc-light" : "tlc-dark";
44
44
  }
45
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemtrooper/learningcode",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "TLC Spark coding agent for students: Pi wired to the Spark OpenAI-compatible endpoint with per-student tokens, quota and seat-queue awareness.",
5
5
  "type": "module",
6
6
  "license": "MIT",