@mingxy/opencode-mascot 0.4.29 → 0.4.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mingxy/opencode-mascot",
3
- "version": "0.4.29",
3
+ "version": "0.4.31",
4
4
  "description": "OpenCode TUI mascot plugin framework - customizable ASCII mascots for your terminal",
5
5
  "author": "mingxy",
6
6
  "license": "MIT",
@@ -52,17 +52,6 @@ const baoziEffects: MascotPack["effects"] = {
52
52
  lines[0] = STEAM_PATTERNS[steamPhase];
53
53
  }
54
54
 
55
- if (ctx.state === "sleeping") {
56
- const zzzPhase = ((ctx.get("steamPhase") as number) % 3) + 1;
57
- for (let i = 0; i < lines.length; i++) {
58
- if (lines[i].includes("-.-")) {
59
- const padded = lines[i].padEnd(10);
60
- lines[i] = padded + " " + "Z" + "z".repeat(zzzPhase - 1);
61
- break;
62
- }
63
- }
64
- }
65
-
66
55
  if (ctx.state === "busy" || ctx.state === "thinking") {
67
56
  const idx = ctx.get("bubbleIdx") as number;
68
57
  if (lines.length > 0) {
@@ -20,10 +20,9 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
20
20
  const initialName = names[Math.floor(Math.random() * names.length)];
21
21
 
22
22
  const cw = (typeof process !== "undefined" && process.stdout?.columns) || 80;
23
- const ch = (typeof process !== "undefined" && process.stdout?.rows) || 24;
24
23
 
25
- const initX = Math.floor(Math.random() * Math.max(0, cw - 12));
26
- const initY = -(Math.floor(Math.random() * Math.min(ch - 8, 15)) + 3);
24
+ const initX = Math.floor((Math.random() - 0.5) * Math.max(0, cw - 20));
25
+ const initY = -(Math.floor(Math.random() * 8) + 2);
27
26
 
28
27
  const [currentName, setCurrentName] = createSignal(initialName);
29
28
  const [zBoost, setZBoost] = createSignal(false);
@@ -446,7 +446,7 @@ export function createAnimatedRenderer(pack: MascotPack): {
446
446
  bounceTimers.push(setTimeout(() => {
447
447
  setJumpOffset(0);
448
448
  bounceTimers = [];
449
- if (Math.random() < 0.3) {
449
+ if (Math.random() < 0.5) {
450
450
  fallApart();
451
451
  }
452
452
  }, 450));