fix: initialize bash warnings before use
This commit is contained in:
@@ -156,6 +156,10 @@ export function createBashTool(
|
|||||||
throw new Error("Provide a command to start.");
|
throw new Error("Provide a command to start.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const maxOutput = DEFAULT_MAX_OUTPUT;
|
||||||
|
const startedAt = Date.now();
|
||||||
|
const sessionId = randomUUID();
|
||||||
|
const warnings: string[] = [];
|
||||||
const backgroundRequested = params.background === true;
|
const backgroundRequested = params.background === true;
|
||||||
const yieldRequested = typeof params.yieldMs === "number";
|
const yieldRequested = typeof params.yieldMs === "number";
|
||||||
if (!allowBackground && (backgroundRequested || yieldRequested)) {
|
if (!allowBackground && (backgroundRequested || yieldRequested)) {
|
||||||
@@ -173,10 +177,6 @@ export function createBashTool(
|
|||||||
120_000,
|
120_000,
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
const maxOutput = DEFAULT_MAX_OUTPUT;
|
|
||||||
const startedAt = Date.now();
|
|
||||||
const sessionId = randomUUID();
|
|
||||||
const warnings: string[] = [];
|
|
||||||
const elevatedDefaults = defaults?.elevated;
|
const elevatedDefaults = defaults?.elevated;
|
||||||
const elevatedDefaultOn =
|
const elevatedDefaultOn =
|
||||||
elevatedDefaults?.defaultLevel === "on" &&
|
elevatedDefaults?.defaultLevel === "on" &&
|
||||||
|
|||||||
Reference in New Issue
Block a user