iskills 0.2.41 → 0.2.45
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 +120 -26
- package/README.zh-CN.md +142 -0
- package/bin/iskills.js +77 -2
- package/bin/opentui-register.mjs +10 -0
- package/bin/opentui-resolve-hook.mjs +12 -0
- package/bin/patch-react-reconciler.mjs +71 -0
- package/dist/src/cli.js +7 -5
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/browser-actions.js +31 -31
- package/dist/src/commands/browser-actions.js.map +1 -1
- package/dist/src/commands/create.d.ts +1 -0
- package/dist/src/commands/create.js +36 -0
- package/dist/src/commands/create.js.map +1 -0
- package/dist/src/commands/index.d.ts +1 -0
- package/dist/src/commands/index.js +28 -9
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/library.js +15 -28
- package/dist/src/commands/library.js.map +1 -1
- package/dist/src/domain/collection-write.d.ts +2 -0
- package/dist/src/domain/collection-write.js +44 -2
- package/dist/src/domain/collection-write.js.map +1 -1
- package/dist/src/domain/core.d.ts +29 -1
- package/dist/src/domain/core.js +125 -8
- package/dist/src/domain/core.js.map +1 -1
- package/dist/src/domain/types.d.ts +2 -0
- package/dist/src/ui/browser/browser.d.ts +2 -1
- package/dist/src/ui/browser/browser.js +179 -44
- package/dist/src/ui/browser/browser.js.map +1 -1
- package/dist/src/ui/browser/detail.d.ts +1 -1
- package/dist/src/ui/browser/detail.js +3 -3
- package/dist/src/ui/browser/detail.js.map +1 -1
- package/dist/src/ui/browser/footer.js +2 -2
- package/dist/src/ui/browser/footer.js.map +1 -1
- package/dist/src/ui/browser/format.d.ts +8 -6
- package/dist/src/ui/browser/format.js +13 -10
- package/dist/src/ui/browser/format.js.map +1 -1
- package/dist/src/ui/browser/index.js +9 -9
- package/dist/src/ui/browser/index.js.map +1 -1
- package/dist/src/ui/browser/layout.d.ts +1 -1
- package/dist/src/ui/browser/layout.js +1 -1
- package/dist/src/ui/browser/shortcut-help.d.ts +2 -0
- package/dist/src/ui/browser/shortcut-help.js +32 -12
- package/dist/src/ui/browser/shortcut-help.js.map +1 -1
- package/dist/src/ui/browser/types.d.ts +1 -1
- package/dist/src/ui/collection-match.js +1 -1
- package/dist/src/ui/collection-match.js.map +1 -1
- package/dist/src/ui/components/colors.d.ts +55 -5
- package/dist/src/ui/components/colors.js +58 -6
- package/dist/src/ui/components/colors.js.map +1 -1
- package/dist/src/ui/components/confirm.js +2 -2
- package/dist/src/ui/components/confirm.js.map +1 -1
- package/dist/src/ui/components/framed-panel.d.ts +3 -3
- package/dist/src/ui/components/framed-panel.js +29 -11
- package/dist/src/ui/components/framed-panel.js.map +1 -1
- package/dist/src/ui/components/link.js +13 -8
- package/dist/src/ui/components/link.js.map +1 -1
- package/dist/src/ui/components/modal-panel.d.ts +9 -0
- package/dist/src/ui/components/modal-panel.js +8 -0
- package/dist/src/ui/components/modal-panel.js.map +1 -0
- package/dist/src/ui/components/modal.js +3 -3
- package/dist/src/ui/components/modal.js.map +1 -1
- package/dist/src/ui/components/mouse/bounds.d.ts +1 -6
- package/dist/src/ui/components/mouse/bounds.js +1 -22
- package/dist/src/ui/components/mouse/bounds.js.map +1 -1
- package/dist/src/ui/components/mouse/clickable.d.ts +6 -4
- package/dist/src/ui/components/mouse/clickable.js +26 -10
- package/dist/src/ui/components/mouse/clickable.js.map +1 -1
- package/dist/src/ui/components/mouse/index.d.ts +2 -2
- package/dist/src/ui/components/mouse/index.js +2 -2
- package/dist/src/ui/components/mouse/index.js.map +1 -1
- package/dist/src/ui/components/mouse/parse.d.ts +1 -1
- package/dist/src/ui/components/mouse/parse.js +3 -3
- package/dist/src/ui/components/mouse/parse.js.map +1 -1
- package/dist/src/ui/components/mouse/provider.d.ts +17 -15
- package/dist/src/ui/components/mouse/provider.js +29 -85
- package/dist/src/ui/components/mouse/provider.js.map +1 -1
- package/dist/src/ui/components/multi-select.js +23 -7
- package/dist/src/ui/components/multi-select.js.map +1 -1
- package/dist/src/ui/components/options.d.ts +2 -1
- package/dist/src/ui/components/options.js +2 -1
- package/dist/src/ui/components/options.js.map +1 -1
- package/dist/src/ui/components/select.d.ts +4 -0
- package/dist/src/ui/components/select.js +31 -34
- package/dist/src/ui/components/select.js.map +1 -1
- package/dist/src/ui/components/spinner.d.ts +16 -0
- package/dist/src/ui/components/spinner.js +45 -0
- package/dist/src/ui/components/spinner.js.map +1 -0
- package/dist/src/ui/components/tabs.js +10 -6
- package/dist/src/ui/components/tabs.js.map +1 -1
- package/dist/src/ui/components/tag-editor.js +8 -5
- package/dist/src/ui/components/tag-editor.js.map +1 -1
- package/dist/src/ui/components/termcn.d.ts +3 -1
- package/dist/src/ui/components/termcn.js +5 -3
- package/dist/src/ui/components/termcn.js.map +1 -1
- package/dist/src/ui/components/text-input.d.ts +4 -0
- package/dist/src/ui/components/text-input.js +29 -69
- package/dist/src/ui/components/text-input.js.map +1 -1
- package/dist/src/ui/components/use-input.d.ts +21 -7
- package/dist/src/ui/components/use-input.js +61 -9
- package/dist/src/ui/components/use-input.js.map +1 -1
- package/dist/src/ui/import/review.js +13 -7
- package/dist/src/ui/import/review.js.map +1 -1
- package/dist/src/ui/import/skill-select.js +37 -7
- package/dist/src/ui/import/skill-select.js.map +1 -1
- package/dist/src/ui/import/types.d.ts +1 -1
- package/dist/src/ui/install/review.js +15 -10
- package/dist/src/ui/install/review.js.map +1 -1
- package/dist/src/ui/install/types.d.ts +4 -6
- package/dist/src/ui/install/types.js +1 -1
- package/dist/src/ui/overlay/bridge.js +4 -0
- package/dist/src/ui/overlay/bridge.js.map +1 -1
- package/dist/src/ui/overlay/dialogs.js +1 -1
- package/dist/src/ui/overlay/host.js +4 -4
- package/dist/src/ui/overlay/host.js.map +1 -1
- package/dist/src/ui/prompts/present.d.ts +1 -1
- package/dist/src/ui/prompts/present.js +4 -3
- package/dist/src/ui/prompts/present.js.map +1 -1
- package/dist/src/ui/search/index.js +7 -6
- package/dist/src/ui/search/index.js.map +1 -1
- package/dist/src/ui/shell/app-shell.d.ts +1 -1
- package/dist/src/ui/shell/app-shell.js +4 -6
- package/dist/src/ui/shell/app-shell.js.map +1 -1
- package/dist/src/ui/shell/footer.js +5 -8
- package/dist/src/ui/shell/footer.js.map +1 -1
- package/dist/src/ui/shell/lifecycle.d.ts +12 -0
- package/dist/src/ui/shell/lifecycle.js +30 -0
- package/dist/src/ui/shell/lifecycle.js.map +1 -0
- package/dist/src/ui/shell/run.d.ts +35 -10
- package/dist/src/ui/shell/run.js +175 -88
- package/dist/src/ui/shell/run.js.map +1 -1
- package/dist/src/ui/shell/terminal.d.ts +1 -1
- package/dist/src/ui/shell/terminal.js +1 -1
- package/dist/src/ui/tui/hooks.d.ts +45 -0
- package/dist/src/ui/tui/hooks.js +79 -0
- package/dist/src/ui/tui/hooks.js.map +1 -0
- package/dist/src/ui/tui/index.d.ts +2 -0
- package/dist/src/ui/tui/index.js +3 -0
- package/dist/src/ui/tui/index.js.map +1 -0
- package/dist/src/ui/tui/primitives.d.ts +12 -0
- package/dist/src/ui/tui/primitives.js +56 -0
- package/dist/src/ui/tui/primitives.js.map +1 -0
- package/dist/src/util/open-path.d.ts +2 -0
- package/dist/src/util/open-path.js +27 -0
- package/dist/src/util/open-path.js.map +1 -0
- package/package.json +11 -8
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@opentui/react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Session hooks: useApp / useStdout / useStdin for product UI.
|
|
4
|
+
*/
|
|
5
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useState, } from 'react';
|
|
6
|
+
import { useOnResize, useRenderer, useTerminalDimensions, } from '@opentui/react';
|
|
7
|
+
import { modalChrome, } from '../components/colors.js';
|
|
8
|
+
const ExitContext = createContext(null);
|
|
9
|
+
export function ExitProvider({ exit, children, }) {
|
|
10
|
+
return _jsx(ExitContext.Provider, { value: exit, children: children });
|
|
11
|
+
}
|
|
12
|
+
/** Session: `{ exit }` to tear down the active OpenTUI session. */
|
|
13
|
+
export function useApp() {
|
|
14
|
+
const exit = useContext(ExitContext);
|
|
15
|
+
if (!exit) {
|
|
16
|
+
throw new Error('useApp must be used within an OpenTUI ExitProvider');
|
|
17
|
+
}
|
|
18
|
+
return { exit };
|
|
19
|
+
}
|
|
20
|
+
/** Terminal size + write sink (OpenTUI dimensions + process.stdout). */
|
|
21
|
+
export function useStdout() {
|
|
22
|
+
const { width, height } = useTerminalDimensions();
|
|
23
|
+
const [size, setSize] = useState({ width, height });
|
|
24
|
+
useOnResize(useCallback((w, h) => {
|
|
25
|
+
setSize({ width: w, height: h });
|
|
26
|
+
}, []));
|
|
27
|
+
const stdout = useMemo(() => ({
|
|
28
|
+
columns: size.width || process.stdout.columns || 80,
|
|
29
|
+
rows: size.height || process.stdout.rows || 24,
|
|
30
|
+
write: (chunk) => process.stdout.write(chunk),
|
|
31
|
+
}), [size.height, size.width]);
|
|
32
|
+
return { stdout };
|
|
33
|
+
}
|
|
34
|
+
/** Best-effort stdin access for legacy mouse providers (prefer OpenTUI mouse). */
|
|
35
|
+
export function useStdin() {
|
|
36
|
+
const renderer = useRenderer();
|
|
37
|
+
const stdin = renderer.stdin ?? process.stdin;
|
|
38
|
+
return {
|
|
39
|
+
stdin,
|
|
40
|
+
setRawMode: () => undefined,
|
|
41
|
+
isRawModeSupported: Boolean(process.stdin.isTTY),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Terminal light/dark preference from OpenTUI (`renderer.themeMode`).
|
|
46
|
+
* Falls back to dark until detection completes.
|
|
47
|
+
*/
|
|
48
|
+
export function useThemeMode() {
|
|
49
|
+
const renderer = useRenderer();
|
|
50
|
+
const [mode, setMode] = useState(() => (renderer.themeMode === 'light' ? 'light' : 'dark'));
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
let cancelled = false;
|
|
53
|
+
if (renderer.themeMode === 'light' || renderer.themeMode === 'dark') {
|
|
54
|
+
setMode(renderer.themeMode);
|
|
55
|
+
}
|
|
56
|
+
const onTheme = (next) => {
|
|
57
|
+
if (next === 'light' || next === 'dark')
|
|
58
|
+
setMode(next);
|
|
59
|
+
};
|
|
60
|
+
renderer.on('theme_mode', onTheme);
|
|
61
|
+
void renderer.waitForThemeMode?.(800).then((detected) => {
|
|
62
|
+
if (cancelled)
|
|
63
|
+
return;
|
|
64
|
+
if (detected === 'light' || detected === 'dark')
|
|
65
|
+
setMode(detected);
|
|
66
|
+
});
|
|
67
|
+
return () => {
|
|
68
|
+
cancelled = true;
|
|
69
|
+
renderer.off('theme_mode', onTheme);
|
|
70
|
+
};
|
|
71
|
+
}, [renderer]);
|
|
72
|
+
return mode;
|
|
73
|
+
}
|
|
74
|
+
/** Modal panel fill/body/muted for the current terminal theme. */
|
|
75
|
+
export function useModalChrome() {
|
|
76
|
+
const mode = useThemeMode();
|
|
77
|
+
return useMemo(() => ({ mode, ...modalChrome(mode) }), [mode]);
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../src/ui/tui/hooks.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,QAAQ,GAET,MAAM,OAAO,CAAC;AACf,OAAO,EACL,WAAW,EACX,WAAW,EACX,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,WAAW,GAGZ,MAAM,yBAAyB,CAAC;AAIjC,MAAM,WAAW,GAAG,aAAa,CAAiB,IAAI,CAAC,CAAC;AAExD,MAAM,UAAU,YAAY,CAAC,EAC3B,IAAI,EACJ,QAAQ,GAIT;IACC,OAAO,KAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAAG,QAAQ,GAAwB,CAAC;AAC9E,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,MAAM;IACpB,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AE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,IAAI,CAAC;AACd,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,cAAc;IAC5B,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;IAC5B,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/tui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,iBAAiB,CAAC;AACvD,OAAO,EACL,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,cAAc,GAEf,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type TextProps = {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
color?: string;
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
bold?: boolean;
|
|
7
|
+
dimColor?: boolean;
|
|
8
|
+
inverse?: boolean;
|
|
9
|
+
underline?: boolean;
|
|
10
|
+
wrap?: 'wrap' | 'truncate' | 'truncate-end' | 'truncate-middle' | 'end';
|
|
11
|
+
};
|
|
12
|
+
export declare function Text({ children, color, backgroundColor, bold, dimColor, inverse, underline, wrap, }: TextProps): ReactNode;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@opentui/react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Text adapter over OpenTUI `<text>` / `<span>`.
|
|
4
|
+
*
|
|
5
|
+
* Keeps product-facing `color` / `bold` / wrap props and fixes two OpenTUI traps:
|
|
6
|
+
* - unset fg defaults to hard-coded white (use RGBA.defaultForeground)
|
|
7
|
+
* - inverse is unreliable with truecolor (map to selection tokens)
|
|
8
|
+
*
|
|
9
|
+
* Layout uses native OpenTUI `<box>` directly — no Box wrapper.
|
|
10
|
+
*/
|
|
11
|
+
import { createTextAttributes, RGBA, } from '@opentui/core';
|
|
12
|
+
import { createContext, useContext, } from 'react';
|
|
13
|
+
import { termcnColors } from '../components/colors.js';
|
|
14
|
+
const TextNestingContext = createContext(false);
|
|
15
|
+
function setIfDefined(target, key, value) {
|
|
16
|
+
if (value !== undefined) {
|
|
17
|
+
target[key] = value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function Text({ children, color, backgroundColor, bold = false, dimColor = false, inverse = false, underline = false, wrap, }) {
|
|
21
|
+
const nested = useContext(TextNestingContext);
|
|
22
|
+
const resolvedFg = inverse
|
|
23
|
+
? (color ?? termcnColors.selectionFg)
|
|
24
|
+
: color !== undefined
|
|
25
|
+
? color
|
|
26
|
+
: RGBA.defaultForeground();
|
|
27
|
+
const resolvedBg = inverse
|
|
28
|
+
? (backgroundColor ?? termcnColors.selectionBg)
|
|
29
|
+
: backgroundColor;
|
|
30
|
+
const attributes = createTextAttributes({
|
|
31
|
+
bold: bold || inverse,
|
|
32
|
+
dim: dimColor,
|
|
33
|
+
inverse: false,
|
|
34
|
+
underline,
|
|
35
|
+
});
|
|
36
|
+
const truncate = wrap === 'truncate' || wrap === 'truncate-end' || wrap === 'end';
|
|
37
|
+
if (nested) {
|
|
38
|
+
const spanProps = {
|
|
39
|
+
attributes,
|
|
40
|
+
children,
|
|
41
|
+
};
|
|
42
|
+
setIfDefined(spanProps, 'fg', resolvedFg);
|
|
43
|
+
setIfDefined(spanProps, 'bg', resolvedBg);
|
|
44
|
+
return _jsx("span", { ...spanProps });
|
|
45
|
+
}
|
|
46
|
+
const textProps = {
|
|
47
|
+
attributes,
|
|
48
|
+
truncate,
|
|
49
|
+
wrapMode: wrap === 'wrap' ? 'word' : 'none',
|
|
50
|
+
children,
|
|
51
|
+
};
|
|
52
|
+
setIfDefined(textProps, 'fg', resolvedFg);
|
|
53
|
+
setIfDefined(textProps, 'bg', resolvedBg);
|
|
54
|
+
return (_jsx(TextNestingContext.Provider, { value: true, children: _jsx("text", { ...textProps }) }));
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../../../src/ui/tui/primitives.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,oBAAoB,EACpB,IAAI,GAEL,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,EACb,UAAU,GAEX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,kBAAkB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAEhD,SAAS,YAAY,CACnB,MAA+B,EAC/B,GAAW,EACX,KAAc;IAEd,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACtB,CAAC;AACH,CAAC;AAaD,MAAM,UAAU,IAAI,CAAC,EACnB,QAAQ,EACR,KAAK,EACL,eAAe,EACf,IAAI,GAAG,KAAK,EACZ,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,SAAS,GAAG,KAAK,EACjB,IAAI,GACM;IACV,MAAM,MAAM,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAC9C,MAAM,UAAU,GAA2B,OAAO;QAChD,CAAC,CAAC,CAAC,KAAK,IAAI,YAAY,CAAC,WAAW,CAAC;QACrC,CAAC,CAAC,KAAK,KAAK,SAAS;YACnB,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC/B,MAAM,UAAU,GAAG,OAAO;QACxB,CAAC,CAAC,CAAC,eAAe,IAAI,YAAY,CAAC,WAAW,CAAC;QAC/C,CAAC,CAAC,eAAe,CAAC;IACpB,MAAM,UAAU,GAAG,oBAAoB,CAAC;QACtC,IAAI,EAAE,IAAI,IAAI,OAAO;QACrB,GAAG,EAAE,QAAQ;QACb,OAAO,EAAE,KAAK;QACd,SAAS;KACV,CAAC,CAAC;IACH,MAAM,QAAQ,GACZ,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,cAAc,IAAI,IAAI,KAAK,KAAK,CAAC;IAEnE,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,SAAS,GAA4B;YACzC,UAAU;YACV,QAAQ;SACT,CAAC;QACF,YAAY,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAC1C,YAAY,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAC1C,OAAO,kBAAW,SAAoB,GAAI,CAAC;IAC7C,CAAC;IAED,MAAM,SAAS,GAA4B;QACzC,UAAU;QACV,QAAQ;QACR,QAAQ,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;QAC3C,QAAQ;KACT,CAAC;IACF,YAAY,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IAC1C,YAAY,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IAE1C,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YACtC,kBAAW,SAAoB,GAAI,GACP,CAC/B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { promisify } from 'node:util';
|
|
3
|
+
const execFileAsync = promisify(execFile);
|
|
4
|
+
/** Open a filesystem path in the platform file manager (Finder / Explorer / xdg-open). */
|
|
5
|
+
export async function openPath(path) {
|
|
6
|
+
if (process.env.SK_NO_OPEN === '1')
|
|
7
|
+
return;
|
|
8
|
+
if (process.platform === 'darwin') {
|
|
9
|
+
await execFileAsync('open', [path]);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (process.platform === 'win32') {
|
|
13
|
+
try {
|
|
14
|
+
await execFileAsync('explorer', [path]);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
// explorer often exits non-zero even when the folder opened successfully.
|
|
18
|
+
// Only surface real spawn failures (e.g. ENOENT), not numeric exit codes.
|
|
19
|
+
const code = error.code;
|
|
20
|
+
if (typeof code === 'string')
|
|
21
|
+
throw error;
|
|
22
|
+
}
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
await execFileAsync('xdg-open', [path]);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=open-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-path.js","sourceRoot":"","sources":["../../../src/util/open-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,0FAA0F;AAC1F,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAY;IACzC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,GAAG;QAAE,OAAO;IAE3C,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAClC,MAAM,aAAa,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;QACpC,OAAO;IACT,CAAC;IACD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,MAAM,aAAa,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,0EAA0E;YAC1E,0EAA0E;YAC1E,MAAM,IAAI,GAAI,KAA+B,CAAC,IAAI,CAAC;YACnD,IAAI,OAAO,IAAI,KAAK,QAAQ;gBAAE,MAAM,KAAK,CAAC;QAC5C,CAAC;QACD,OAAO;IACT,CAAC;IACD,MAAM,aAAa,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iskills",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.45",
|
|
4
4
|
"description": "Personal Skill collection terminal app for AI coding agents",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,23 +20,25 @@
|
|
|
20
20
|
"bin",
|
|
21
21
|
"dist/src",
|
|
22
22
|
"README.md",
|
|
23
|
+
"README.zh-CN.md",
|
|
23
24
|
"THIRD_PARTY_NOTICES.md"
|
|
24
25
|
],
|
|
25
26
|
"engines": {
|
|
26
27
|
"node": ">=24"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"
|
|
30
|
+
"@opentui/core": "0.4.5",
|
|
31
|
+
"@opentui/react": "0.4.5",
|
|
30
32
|
"jotai": "^2.20.2",
|
|
31
33
|
"react": "^19.2.0",
|
|
32
34
|
"string-width": "^8.2.2",
|
|
33
|
-
"terminal-link": "^5.0.0"
|
|
35
|
+
"terminal-link": "^5.0.0",
|
|
36
|
+
"react-reconciler": "^0.33.0"
|
|
34
37
|
},
|
|
35
38
|
"devDependencies": {
|
|
36
39
|
"@types/node": "^24.0.0",
|
|
37
40
|
"@types/react": "^19.2.0",
|
|
38
41
|
"@xterm/headless": "^6.0.0",
|
|
39
|
-
"ink-testing-library": "^4.0.0",
|
|
40
42
|
"typescript": "^7.0.0",
|
|
41
43
|
"vitest": "^4.1.10"
|
|
42
44
|
},
|
|
@@ -46,9 +48,10 @@
|
|
|
46
48
|
"start": "pnpm run -s build && node ./bin/iskills.js",
|
|
47
49
|
"test": "pnpm run -s build && node scripts/test-dev.mjs",
|
|
48
50
|
"test:dev": "pnpm run -s build && node scripts/test-dev.mjs",
|
|
49
|
-
"test:fast": "pnpm run -s build && vitest run --project parallel",
|
|
50
|
-
"test:git": "pnpm run -s build && vitest run --project git",
|
|
51
|
-
"test:tty": "pnpm run -s build && vitest run --project tty",
|
|
52
|
-
"type-check": "tsc --noEmit"
|
|
51
|
+
"test:fast": "pnpm run -s build && bun ./node_modules/vitest/vitest.mjs run --project parallel",
|
|
52
|
+
"test:git": "pnpm run -s build && bun ./node_modules/vitest/vitest.mjs run --project git",
|
|
53
|
+
"test:tty": "pnpm run -s build && bun ./node_modules/vitest/vitest.mjs run --project tty",
|
|
54
|
+
"type-check": "tsc --noEmit",
|
|
55
|
+
"postinstall": "node ./bin/patch-react-reconciler.mjs || true"
|
|
53
56
|
}
|
|
54
57
|
}
|