@ship-cli/opencode 0.0.3 → 0.0.4
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 +1 -1
- package/src/plugin.ts +6 -3
package/package.json
CHANGED
package/src/plugin.ts
CHANGED
|
@@ -79,7 +79,8 @@ async function injectShipContext(
|
|
|
79
79
|
context?: { model?: { providerID: string; modelID: string }; agent?: string }
|
|
80
80
|
): Promise<void> {
|
|
81
81
|
try {
|
|
82
|
-
|
|
82
|
+
// Use quiet() to prevent any output from bleeding into TUI
|
|
83
|
+
const primeOutput = await $`ship prime`.quiet().text();
|
|
83
84
|
|
|
84
85
|
if (!primeOutput || primeOutput.trim() === "") {
|
|
85
86
|
return;
|
|
@@ -116,7 +117,8 @@ async function runShip(
|
|
|
116
117
|
args: string[]
|
|
117
118
|
): Promise<{ success: boolean; output: string }> {
|
|
118
119
|
try {
|
|
119
|
-
|
|
120
|
+
// Use quiet() to prevent output from bleeding into TUI
|
|
121
|
+
const result = await $`ship ${args}`.quiet().nothrow();
|
|
120
122
|
const stdout = await new Response(result.stdout).text();
|
|
121
123
|
const stderr = await new Response(result.stderr).text();
|
|
122
124
|
|
|
@@ -140,7 +142,8 @@ async function runShip(
|
|
|
140
142
|
async function isShipConfigured($: PluginInput["$"]): Promise<boolean> {
|
|
141
143
|
try {
|
|
142
144
|
// Try running ship prime - it will fail if not configured
|
|
143
|
-
|
|
145
|
+
// Use quiet() to suppress stdout/stderr from bleeding into TUI
|
|
146
|
+
const result = await $`ship prime`.quiet().nothrow();
|
|
144
147
|
return result.exitCode === 0;
|
|
145
148
|
} catch {
|
|
146
149
|
return false;
|