@mingxy/ocosay 1.1.4 → 1.1.5
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/package.json +2 -2
- package/dist/plugin.js +10 -9
- package/package.json +2 -2
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mingxy/ocosay",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "OpenCode TTS 播放插件 - 支持豆包模式边接收边朗读",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/plugin.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"zod": "^4.3.6"
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"naudiodon": "^
|
|
51
|
+
"naudiodon": "^2.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/howler": "^2.2.12",
|
package/dist/plugin.js
CHANGED
|
@@ -9577,7 +9577,7 @@ function markNaudiodonSkipped() {
|
|
|
9577
9577
|
}
|
|
9578
9578
|
async function ensureNaudiodonCompiled() {
|
|
9579
9579
|
if (shouldSkipNaudiodon()) {
|
|
9580
|
-
logger7.info("naudiodon skipped previously
|
|
9580
|
+
logger7.info("naudiodon skipped previously");
|
|
9581
9581
|
return;
|
|
9582
9582
|
}
|
|
9583
9583
|
try {
|
|
@@ -9585,12 +9585,12 @@ async function ensureNaudiodonCompiled() {
|
|
|
9585
9585
|
logger7.info("naudiodon already compiled");
|
|
9586
9586
|
return;
|
|
9587
9587
|
} catch {
|
|
9588
|
-
logger7.info("naudiodon not compiled,
|
|
9588
|
+
logger7.info("naudiodon not compiled, will attempt to compile");
|
|
9589
|
+
notificationService.info("\u6B63\u5728\u7F16\u8BD1 naudiodon...", "Ocosay \u97F3\u9891\u540E\u7AEF");
|
|
9589
9590
|
}
|
|
9590
9591
|
try {
|
|
9591
9592
|
const naudiodonPath = dirname2(require2.resolve("naudiodon"));
|
|
9592
|
-
logger7.info({ naudiodonPath }, "found naudiodon
|
|
9593
|
-
notificationService.info("\u6B63\u5728\u7F16\u8BD1 naudiodon...", "Ocosay \u97F3\u9891\u540E\u7AEF");
|
|
9593
|
+
logger7.info({ naudiodonPath }, "found naudiodon, rebuilding");
|
|
9594
9594
|
execSync("npm rebuild naudiodon", {
|
|
9595
9595
|
cwd: naudiodonPath,
|
|
9596
9596
|
stdio: "inherit"
|
|
@@ -9598,7 +9598,7 @@ async function ensureNaudiodonCompiled() {
|
|
|
9598
9598
|
logger7.info("naudiodon compiled successfully");
|
|
9599
9599
|
notificationService.success("naudiodon \u7F16\u8BD1\u6210\u529F", "\u97F3\u9891\u540E\u7AEF\u5DF2\u5C31\u7EEA");
|
|
9600
9600
|
} catch (err) {
|
|
9601
|
-
logger7.warn({ err }, "naudiodon rebuild failed, checking for PortAudio
|
|
9601
|
+
logger7.warn({ err }, "naudiodon rebuild failed, checking for PortAudio");
|
|
9602
9602
|
notificationService.warning("naudiodon \u7F16\u8BD1\u5931\u8D25", "\u6B63\u5728\u5C1D\u8BD5\u5B89\u88C5 PortAudio...");
|
|
9603
9603
|
const installed = installPortAudio();
|
|
9604
9604
|
if (installed) {
|
|
@@ -9612,12 +9612,13 @@ async function ensureNaudiodonCompiled() {
|
|
|
9612
9612
|
logger7.info("naudiodon compiled successfully after PortAudio install");
|
|
9613
9613
|
notificationService.success("naudiodon \u7F16\u8BD1\u6210\u529F", "\u97F3\u9891\u540E\u7AEF\u5DF2\u5C31\u7EEA");
|
|
9614
9614
|
} catch (retryErr) {
|
|
9615
|
-
logger7.error({ err: retryErr }, "
|
|
9616
|
-
notificationService.error("naudiodon \u7F16\u8BD1\u5931\u8D25", "\
|
|
9615
|
+
logger7.error({ err: retryErr }, "naudiodon compile failed even after PortAudio install");
|
|
9616
|
+
notificationService.error("naudiodon \u7F16\u8BD1\u5931\u8D25", "\u81EA\u52A8\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u5C1D\u8BD5\u624B\u52A8\u5B89\u88C5");
|
|
9617
9617
|
markNaudiodonSkipped();
|
|
9618
9618
|
}
|
|
9619
9619
|
} else {
|
|
9620
|
-
|
|
9620
|
+
logger7.error("PortAudio install failed");
|
|
9621
|
+
notificationService.error("PortAudio \u5B89\u88C5\u5931\u8D25", "\u81EA\u52A8\u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u5C1D\u8BD5\u624B\u52A8\u5B89\u88C5");
|
|
9621
9622
|
markNaudiodonSkipped();
|
|
9622
9623
|
}
|
|
9623
9624
|
}
|
|
@@ -9771,7 +9772,6 @@ var server = (async (input, _options) => {
|
|
|
9771
9772
|
const opencodeTui = input.client?.tui;
|
|
9772
9773
|
global.__opencode_tui__ = opencodeTui;
|
|
9773
9774
|
notificationService.setTui(opencodeTui);
|
|
9774
|
-
await ensureNaudiodonCompiled();
|
|
9775
9775
|
const config = loadOrCreateConfig();
|
|
9776
9776
|
try {
|
|
9777
9777
|
await initialize({
|
|
@@ -9788,6 +9788,7 @@ var server = (async (input, _options) => {
|
|
|
9788
9788
|
initError = err instanceof Error ? err : new Error(String(err));
|
|
9789
9789
|
logger7.error({ error: initError }, "initialization failed");
|
|
9790
9790
|
}
|
|
9791
|
+
await ensureNaudiodonCompiled();
|
|
9791
9792
|
setTimeout(() => {
|
|
9792
9793
|
if (initError) {
|
|
9793
9794
|
notificationService.error(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mingxy/ocosay",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "OpenCode TTS 播放插件 - 支持豆包模式边接收边朗读",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/plugin.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"zod": "^4.3.6"
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"naudiodon": "^
|
|
51
|
+
"naudiodon": "^2.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/howler": "^2.2.12",
|