Skip to content

Conversation

@catrielmuller
Copy link
Contributor

@catrielmuller catrielmuller commented Oct 24, 2025

Context

Resolve: #2995

Implementation

  • '/tasks' command with subcommands
  • Refactor clear screen to improve the experience
  • Automatic fetch the fist page to speedup the first '/tasks'
  • Util generateMessage to generate unique ids

Screenshots

image image image image image image image image image image image image image image image

@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2025

🦋 Changeset detected

Latest commit: 7998d7b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kilocode/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@catrielmuller catrielmuller requested review from RSO and Copilot October 24, 2025 21:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces task history functionality to the CLI, enabling users to view, search, filter, and navigate through their task history directly from the command line. The implementation adds a new /tasks command with multiple subcommands, integrates task history state management, and includes terminal refresh capabilities.

Key Changes

  • Added /tasks command with subcommands for viewing, searching, selecting, and filtering task history
  • Implemented task history state management using Jotai atoms
  • Enhanced terminal clearing mechanism with a new refresh functionality

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
cli/src/commands/tasks.ts New command implementing task history viewing, search, pagination, and filtering
cli/src/state/atoms/taskHistory.ts Task history state atoms for data, filters, pagination, and loading states
cli/src/state/hooks/useTaskHistory.ts Hook for managing task history operations and state updates
cli/src/state/atoms/ui.ts Added refreshTerminalAtom for terminal clearing
cli/src/state/hooks/useTerminal.ts Updated to use refreshTerminalCounter for terminal clearing
cli/src/state/hooks/useCommandContext.ts Extended context with task history functionality
cli/src/state/atoms/effects.ts Added handler for taskHistoryResponse messages
cli/src/ui/UI.tsx Added task history fetching on mount
cli/src/commands/core/types.ts Extended CommandContext with task history properties
cli/src/commands/new.ts Added terminal refresh on new task
cli/src/commands/clear.ts Added terminal refresh on clear
cli/src/commands/index.ts Registered tasks command
cli/src/state/hooks/useCommandInput.ts Added taskHistoryData to context
cli/src/services/autocomplete.ts Added taskHistoryData to provider context
cli/src/ui/messages/MessageDisplay.tsx Added logs import
.changeset/spicy-kings-appear.md Changelog entry

@catrielmuller catrielmuller force-pushed the catrielmuller/cli-tasks-list-and-load branch from e6f290d to 7998d7b Compare November 3, 2025 14:18
@@ -0,0 +1,8 @@
export const generateMessage = () => {
const now = Date.now()
const uniqueSuffix = Math.floor(Math.random() * 10000)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can be slightly more robust by having a counter variable above and then just using/incrementing the counter instead of generating a random suffix.

Copy link
Contributor Author

@catrielmuller catrielmuller Nov 4, 2025

Choose a reason for hiding this comment

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

We can add uuid to be more safe, this is a minimal workaround on the CLI. The extension shouls be send the Messages with a unique ID.
@RSO, What do you think of this?

@catrielmuller catrielmuller merged commit f53add8 into main Nov 4, 2025
14 checks passed
@catrielmuller catrielmuller deleted the catrielmuller/cli-tasks-list-and-load branch November 4, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI Kilo Code CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a /history command

4 participants