mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 13:42:21 +00:00
Fix tsconfig and test folder
This commit is contained in:
@@ -182,15 +182,15 @@ function levenshtein(left: string, right: string): number {
|
||||
const cost = left[leftIndex - 1] === right[rightIndex - 1] ? 0 : 1;
|
||||
|
||||
row[rightIndex] = Math.min(
|
||||
row[rightIndex] + 1,
|
||||
row[rightIndex - 1] + 1,
|
||||
previous + cost,
|
||||
row[rightIndex]! + 1,
|
||||
row[rightIndex - 1]! + 1,
|
||||
previous! + cost,
|
||||
);
|
||||
previous = current;
|
||||
}
|
||||
}
|
||||
|
||||
return row[right.length];
|
||||
return row[right.length]!;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -242,7 +242,7 @@ function suggestModels(requested: string, allowlist: string[]): string[] {
|
||||
* ```
|
||||
*/
|
||||
function formatInvalidModelError(invalidModels: string[], allowlist: string[]): string {
|
||||
const [firstInvalidModel] = invalidModels;
|
||||
const firstInvalidModel = invalidModels[0]!;
|
||||
const suggestions = suggestModels(firstInvalidModel, allowlist);
|
||||
const suggestionText =
|
||||
suggestions.length > 0
|
||||
@@ -369,7 +369,7 @@ export default tool({
|
||||
const failedModels: string[] = [];
|
||||
|
||||
for (let i = 0; i < windowPlans.length; i++) {
|
||||
const plan = windowPlans[i];
|
||||
const plan = windowPlans[i]!;
|
||||
const isFirst = i === 0;
|
||||
|
||||
const worktreePath = getWorktreePath(safeSessionName, plan.windowName);
|
||||
|
||||
Reference in New Issue
Block a user