Skip to content

feat(vscode): add option to extend viewable sessions limit - #14272

Closed
lightmanLP wants to merge 3 commits into
Kilo-Org:mainfrom
lightmanLP:feat/sessions-count-option
Closed

lightmanLP wants to merge 3 commits into
Kilo-Org:mainfrom
lightmanLP:feat/sessions-count-option

Conversation

@lightmanLP

Copy link
Copy Markdown

Issue

I just saw that my old sessions disappeared from tabs suddenly. I tried to reopen them, but list just can't show em, cause there was more than 100 sessions between.

Context

Allows you to view more than 100 sessions in vscode extension.

Implementation

Its really basic edit, I just hooked limit to config variable.

How to Test

Manual/local verification

  • Change config value
  • Open history and look at sessions count

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

@lightmanLP lightmanLP changed the title Add option to extend viewable sessions limit in vscode. feat: add option to extend viewable sessions limit in vscode Sep 18, 2026
@lightmanLP lightmanLP changed the title feat: add option to extend viewable sessions limit in vscode feat(vscode): add option to extend viewable sessions limit Sep 18, 2026
@lightmanLP
lightmanLP marked this pull request as ready for review September 18, 2026 02:46
Comment thread packages/kilo-vscode/package.json
Comment thread packages/kilo-vscode/package.json Outdated
"description": "Render Markdown files in Kilo diff viewers by default. Toggle this from a Markdown file header in the diff viewer."
},
"kilo-code.new.sessionsLimit": {
"type": "number",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: The setting is declared as number, which permits decimals, but the value is passed straight through to the session-list limit query and into a SQL LIMIT. The server schema for session.list (ListQuery.limit in packages/opencode/src/server/routes/instance/httpapi/groups/session.ts) does not enforce an integer, unlike the message pagination query which checks Schema.isInt(), so a value like 100.5 reaches the query unchanged. Using "type": "integer" keeps the value well-formed.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kilocode-bot fix it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To use Kilo from GitHub you first need to link your GitHub account to Kilo. Link your Kilo account to continue. After linking, mention me again in this issue or pull request.

{
directory: dir,
roots: true,
limit: vscode.workspace.getConfiguration("kilo-code.new").get<number>("sessionsLimit", 100)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Consider bounding this value. loadSessions calls the listSessions callback once for the workspace directory and once per registered worktree directory, then merges the results and posts every session to the webview on each refresh. A very large sessionsLimit multiplies both the rows fetched from the backend and the payload sent to the webview, so an accidental unbounded value can make history loading noticeably slow. A maximum in the setting schema (or a smaller per-directory fetch with lazy loading) would keep this predictable.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/src/KiloProvider.ts 2426 No upper bound on the fetch limit; multiplied per workspace/worktree directory on every refresh
Files Reviewed (3 files)
  • .changeset/sessions-limit-history.md - added in this revision; user-facing description, no issues
  • packages/kilo-vscode/package.json - sessionsLimit type changed to integer; previous decimal-number finding resolved, and the missing-changeset finding is resolved
  • packages/kilo-vscode/src/KiloProvider.ts - 1 carried-forward suggestion (unchanged since the previous review)

Fix these issues in Kilo Cloud

Previous Review Summary (commit e9e57ce)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit e9e57ce)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 3
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/package.json 1268 New user-facing setting has no changeset
packages/kilo-vscode/package.json 1269 type: "number" permits decimals that flow into a SQL LIMIT; prefer integer
packages/kilo-vscode/src/KiloProvider.ts 2426 No upper bound on the fetch limit; multiplied per workspace/worktree directory on every refresh
Files Reviewed (2 files)
  • packages/kilo-vscode/package.json - 2 issues
  • packages/kilo-vscode/src/KiloProvider.ts - 1 issue

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Thanks for the feedback and effort @lightmanLP , I opted for paging instead. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants