auq-mcp-server 2.7.1 → 3.0.0
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/dist/bin/tui-app.js +3 -2
- package/dist/package.json +3 -3
- package/dist/src/i18n/types.js +0 -1
- package/dist/src/tui/shared/session-events.js +0 -1
- package/dist/src/tui/shared/themes/types.js +0 -1
- package/dist/src/tui/shared/types.js +0 -1
- package/dist/src/tui-opentui/ConfigContext.js +10 -0
- package/dist/src/tui-opentui/ThemeProvider.js +73 -0
- package/dist/src/tui-opentui/app.js +536 -0
- package/dist/src/tui-opentui/components/AnimatedGradient.js +56 -0
- package/dist/src/tui-opentui/components/ConfirmationDialog.js +89 -0
- package/dist/src/tui-opentui/components/CustomInput.js +25 -0
- package/dist/src/tui-opentui/components/ErrorBoundary.js +26 -0
- package/dist/src/tui-opentui/components/Footer.js +92 -0
- package/dist/src/tui-opentui/components/Header.js +46 -0
- package/dist/src/tui-opentui/components/MarkdownPrompt.js +13 -0
- package/dist/src/tui-opentui/components/OptionsList.js +258 -0
- package/dist/src/tui-opentui/components/QuestionDisplay.js +23 -0
- package/dist/src/tui-opentui/components/ReviewScreen.js +81 -0
- package/dist/src/tui-opentui/components/SessionDots.js +86 -0
- package/dist/src/tui-opentui/components/SessionPicker.js +162 -0
- package/dist/src/tui-opentui/components/SingleLineTextInput.js +9 -0
- package/dist/src/tui-opentui/components/StepperView.js +493 -0
- package/dist/src/tui-opentui/components/TabBar.js +79 -0
- package/dist/src/tui-opentui/components/ThemeIndicator.js +35 -0
- package/dist/src/tui-opentui/components/Toast.js +44 -0
- package/dist/src/tui-opentui/components/UpdateBadge.js +24 -0
- package/dist/src/tui-opentui/components/UpdateOverlay.js +162 -0
- package/dist/src/tui-opentui/components/WaitingScreen.js +44 -0
- package/dist/src/tui-opentui/hooks/useSessionWatcher.js +69 -0
- package/dist/src/tui-opentui/hooks/useTerminalDimensions.js +8 -0
- package/dist/src/tui-opentui/utils/syntaxStyle.js +64 -0
- package/dist/src/update/types.js +0 -1
- package/package.json +3 -3
package/dist/bin/tui-app.js
CHANGED
|
@@ -594,8 +594,9 @@ export const runTui = async (config) => {
|
|
|
594
594
|
await runOpenTui(mergedConfig);
|
|
595
595
|
}
|
|
596
596
|
catch (err) {
|
|
597
|
-
console.
|
|
598
|
-
|
|
597
|
+
console.error(`❌ OpenTUI failed to initialize: ${err instanceof Error ? err.message : String(err)}`);
|
|
598
|
+
console.error(`\n To use the legacy ink renderer, set AUQ_RENDERER=ink or add "renderer": "ink" to your .auqrc.json\n`);
|
|
599
|
+
process.exit(1);
|
|
599
600
|
}
|
|
600
601
|
}
|
|
601
602
|
else {
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auq-mcp-server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"auq": "dist/bin/auq.js"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"packages/opencode-plugin"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "bun run sync-plugin-schemas && bun run generate:skill && tsc",
|
|
18
|
+
"build": "bun run sync-plugin-schemas && bun run generate:skill && tsc && tsc -p tsconfig.opentui.json",
|
|
19
19
|
"prepare": "bun run build",
|
|
20
20
|
"postinstall": "node scripts/postinstall.cjs",
|
|
21
21
|
"release": "semantic-release",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"validate:skill": "bunx skills-ref validate skills/ask-user-questions",
|
|
30
30
|
"test": "vitest run",
|
|
31
31
|
"format": "prettier --write . && eslint --fix .",
|
|
32
|
-
"build:opentui": "tsc -p tsconfig.opentui.json
|
|
32
|
+
"build:opentui": "tsc -p tsconfig.opentui.json",
|
|
33
33
|
"test:opentui": "bun test src/tui-opentui",
|
|
34
34
|
"typecheck:all": "tsc --noEmit && tsc -p tsconfig.opentui.json --noEmit"
|
|
35
35
|
},
|
package/dist/src/i18n/types.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { DEFAULT_CONFIG } from "../config/defaults.js";
|
|
4
|
+
const ConfigContext = createContext({ config: DEFAULT_CONFIG });
|
|
5
|
+
export function ConfigProvider({ config, children, }) {
|
|
6
|
+
return (_jsx(ConfigContext.Provider, { value: { config }, children: children }));
|
|
7
|
+
}
|
|
8
|
+
export function useConfig() {
|
|
9
|
+
return useContext(ConfigContext).config;
|
|
10
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useState, } from "react";
|
|
3
|
+
import { useKeyboard } from "@opentui/react";
|
|
4
|
+
import { getTheme, listThemes, hasTheme, darkTheme, } from "../tui/shared/themes/index.js";
|
|
5
|
+
import { detectSystemTheme } from "../tui/shared/utils/detectTheme.js";
|
|
6
|
+
import { getSavedTheme, saveTheme } from "../tui/shared/utils/config.js";
|
|
7
|
+
import { generateSyntaxStyle } from "./utils/syntaxStyle.js";
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
// Context
|
|
10
|
+
// ---------------------------------------------------------------------------
|
|
11
|
+
const ThemeContext = createContext(null);
|
|
12
|
+
/**
|
|
13
|
+
* Consume the nearest ThemeProvider.
|
|
14
|
+
* Throws if called outside of one (fail-fast, no silent undefined).
|
|
15
|
+
*/
|
|
16
|
+
export function useTheme() {
|
|
17
|
+
const ctx = useContext(ThemeContext);
|
|
18
|
+
if (!ctx) {
|
|
19
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
20
|
+
}
|
|
21
|
+
return ctx;
|
|
22
|
+
}
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
// Internals
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
/** Resolve a ThemeMode into a concrete Theme object. */
|
|
27
|
+
function resolveTheme(mode) {
|
|
28
|
+
if (mode === "system") {
|
|
29
|
+
const detected = detectSystemTheme();
|
|
30
|
+
return getTheme(detected) ?? darkTheme;
|
|
31
|
+
}
|
|
32
|
+
return getTheme(mode) ?? darkTheme;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Determine initial theme:
|
|
36
|
+
* 1. Explicit prop override (if not "system")
|
|
37
|
+
* 2. Persisted user preference from config
|
|
38
|
+
* 3. Fallback to "system"
|
|
39
|
+
*/
|
|
40
|
+
function getInitialTheme(prop) {
|
|
41
|
+
if (prop && prop !== "system")
|
|
42
|
+
return prop;
|
|
43
|
+
const saved = getSavedTheme();
|
|
44
|
+
if (saved && (saved === "system" || hasTheme(saved)))
|
|
45
|
+
return saved;
|
|
46
|
+
return "system";
|
|
47
|
+
}
|
|
48
|
+
export function ThemeProvider({ initialTheme, children, }) {
|
|
49
|
+
const [themeName, setThemeName] = useState(() => getInitialTheme(initialTheme));
|
|
50
|
+
// Resolve the full Theme + SyntaxStyle when the mode changes.
|
|
51
|
+
const theme = useMemo(() => resolveTheme(themeName), [themeName]);
|
|
52
|
+
const syntaxStyle = useMemo(() => generateSyntaxStyle(theme), [theme]);
|
|
53
|
+
const cycleTheme = useCallback(() => {
|
|
54
|
+
setThemeName((current) => {
|
|
55
|
+
const allThemes = ["system", ...listThemes()];
|
|
56
|
+
const idx = allThemes.indexOf(current);
|
|
57
|
+
const next = (idx + 1) % allThemes.length;
|
|
58
|
+
return allThemes[next];
|
|
59
|
+
});
|
|
60
|
+
}, []);
|
|
61
|
+
// Ctrl+T to cycle theme — matches ink behaviour.
|
|
62
|
+
useKeyboard((key) => {
|
|
63
|
+
if (key.ctrl && key.name === "t") {
|
|
64
|
+
cycleTheme();
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
// Persist theme choice whenever it changes.
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
saveTheme(themeName);
|
|
70
|
+
}, [themeName]);
|
|
71
|
+
const value = useMemo(() => ({ theme, themeName, syntaxStyle, cycleTheme }), [theme, themeName, syntaxStyle, cycleTheme]);
|
|
72
|
+
return (_jsx(ThemeContext.Provider, { value: value, children: children }));
|
|
73
|
+
}
|