Change tab selection to use 0-based indexing instead of 1-based

Co-authored-by: Skn0tt <14912729+Skn0tt@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-06-19 09:38:10 +00:00
parent c82a17ddfd
commit 708aa6d6a5
4 changed files with 12 additions and 12 deletions

View File

@@ -101,7 +101,7 @@ export class Context {
}
async selectTab(index: number) {
this._currentTab = this._tabs[index - 1];
this._currentTab = this._tabs[index];
await this._currentTab.page.bringToFront();
}
@@ -127,7 +127,7 @@ export class Context {
}
async closeTab(index: number | undefined) {
const tab = index === undefined ? this._currentTab : this._tabs[index - 1];
const tab = index === undefined ? this._currentTab : this._tabs[index];
await tab?.page.close();
return await this.listTabsMarkdown();
}