Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create clear subcommand #28

Open
divanvisagie opened this issue Jun 9, 2024 · 0 comments
Open

create clear subcommand #28

divanvisagie opened this issue Jun 9, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@divanvisagie
Copy link
Owner

Current Issue

The current method for clearing the session cache requires the verbose command:

cgip session -v

This is cumbersome for regular use.

Proposed Enhancement

Introduce a simpler clear subcommand to enhance user-friendliness:

cgip clear

Additional Consideration

To make session management even more flexible, consider distinguishing between a "soft" and a "hard" clear:

  • Soft Clear: Marks a point in the session file where everything above is not used, allowing users to retain their history.
  • Hard Clear: Completely removes items older than a certain point, ensuring older contexts are permanently deleted.

This enhancement will require modifications to the context window management, ensuring that items older than a specified number are retained for historical access if a soft clear is performed.

Benefits

  • Simplifies the command for clearing the session cache, improving user experience.
  • Enhances flexibility by offering users the ability to manage historical data along with the current active context.

Current vs. Proposed Methods

  1. Current method to clear session cache:

    cgip session -v
  2. Proposed method:

    cgip clear

Expected Outcome

  • The cgip clear command should clear the session cache in a straightforward manner.
  • Introduction of optional soft and hard clear functionalities:
    • Soft clear by default.
    • Use --hard flag for a full, irreversible delete.
    • Optionally, an --all flag to clear all session caches, ensuring the default does not clear everything by default.

Action Items:

  • Implement the clear subcommand.
  • Modify context window management to support soft and hard clear functionalities.
  • Update the documentation to reflect these changes.
@divanvisagie divanvisagie added the enhancement New feature or request label Jun 9, 2024
@divanvisagie divanvisagie self-assigned this Jun 9, 2024
@divanvisagie divanvisagie added the help wanted Extra attention is needed label Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant