Class SessionListFilter

java.lang.Object
com.github.copilot.rpc.SessionContext
com.github.copilot.rpc.SessionListFilter

public class SessionListFilter extends SessionContext
Filter options for listing sessions.

Extends SessionContext to provide filtering capabilities with fluent setter methods that return the filter instance for method chaining.

Example Usage

// Filter sessions by repository
var filter = new SessionListFilter().setRepository("owner/repo");
var sessions = client.listSessions(filter).get();

// Filter by working directory
var filter = new SessionListFilter().setCwd("/path/to/project");
var sessions = client.listSessions(filter).get();
Since:
1.0.0
See Also:
  • Constructor Details

    • SessionListFilter

      public SessionListFilter()
  • Method Details

    • setCwd

      public SessionListFilter setCwd(String cwd)
      Sets the filter for exact cwd match.
      Overrides:
      setCwd in class SessionContext
      Parameters:
      cwd - the current working directory to filter by
      Returns:
      this filter for method chaining
    • setGitRoot

      public SessionListFilter setGitRoot(String gitRoot)
      Sets the filter for git root directory.
      Overrides:
      setGitRoot in class SessionContext
      Parameters:
      gitRoot - the git root path to filter by
      Returns:
      this filter for method chaining
    • setRepository

      public SessionListFilter setRepository(String repository)
      Sets the filter for repository (in "owner/repo" format).
      Overrides:
      setRepository in class SessionContext
      Parameters:
      repository - the repository identifier to filter by
      Returns:
      this filter for method chaining
    • setBranch

      public SessionListFilter setBranch(String branch)
      Sets the filter for git branch.
      Overrides:
      setBranch in class SessionContext
      Parameters:
      branch - the branch name to filter by
      Returns:
      this filter for method chaining