@mingxy/opencode-mascot 0.5.4 → 0.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mingxy/opencode-mascot",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "OpenCode TUI mascot plugin framework - customizable ASCII mascots for your terminal",
5
5
  "author": "mingxy",
6
6
  "license": "MIT",
@@ -145,7 +145,7 @@ const yueerEffects: MascotPack["effects"] = {
145
145
  if (stompActive) {
146
146
  const legIdx = result.length - 1;
147
147
  if (legIdx >= 0) {
148
- result[legIdx] = stompAlt ? " ║ _ " : " _ ";
148
+ result[legIdx] = stompAlt ? " ║ " : " _ ";
149
149
  }
150
150
  }
151
151
 
@@ -17,7 +17,7 @@ interface HomeMascotProps {
17
17
 
18
18
  export function HomeMascot(props: HomeMascotProps): JSX.Element {
19
19
  const names = Object.keys(props.mascots);
20
- const initialName = names[Math.floor(Math.random() * names.length)];
20
+ const initialName = props.mascots["yueer"] ? "yueer" : names[0];
21
21
 
22
22
  const cw = (typeof process !== "undefined" && process.stdout?.columns) || 80;
23
23
 
@@ -23,8 +23,8 @@ const DEFAULT_STATE_MAP: Partial<Record<MascotState, string>> = {
23
23
  idle: "yueer",
24
24
  happy: "yueer",
25
25
  thinking: "yueer",
26
- busy: "baozi",
27
- sleeping: "baozi",
26
+ busy: "yueer",
27
+ sleeping: "yueer",
28
28
  };
29
29
 
30
30
  const MASCOT_WIDTH = 10;
@@ -37,7 +37,9 @@ export function SidebarMascot(props: SidebarMascotProps): JSX.Element {
37
37
  const initialName =
38
38
  props.initialMascot && props.mascots[props.initialMascot]
39
39
  ? props.initialMascot
40
- : names[Math.floor(Math.random() * names.length)];
40
+ : props.mascots["yueer"]
41
+ ? "yueer"
42
+ : names[0];
41
43
 
42
44
  const [currentName, setCurrentName] = createSignal(initialName);
43
45
  const [posX, setPosX] = createSignal(20);