Skip to content

Isolated Flag and Additional Header Information with Claude Config Directory being used#136

Closed
retroryan wants to merge 2 commits intoryoppippi:mainfrom
retroryan:show-claude-config
Closed

Isolated Flag and Additional Header Information with Claude Config Directory being used#136
retroryan wants to merge 2 commits intoryoppippi:mainfrom
retroryan:show-claude-config

Conversation

@retroryan
Copy link

@retroryan retroryan commented Jun 21, 2025

Overview: Added a new --isolated flag to all commands that restricts usage analysis to only the
CLAUDE_CONFIG_DIR environment variable, enabling targeted analysis of specific Claude installations.

Key Changes:

• Added --isolated flag - New -i, --isolated option available on all four main commands (daily, monthly,
session, blocks) to use only a specific Claude config directory

• Enhanced configuration display - Added header information showing which Claude config directory is being used
and the specific paths being read from

• Isolated mode headers - Commands display "Isolated" prefix in titles when using the flag (e.g., "Isolated
Daily", "Isolated Sessions")

• JSON output support - Isolated mode includes isolatedPaths field in JSON output for programmatic use

• Robust error handling - Clear error messages when CLAUDE_CONFIG_DIR is not set or points to invalid
directories

Use Cases:

  • Analyze usage from a specific Claude Code instance
  • Separate personal vs work usage analysis
  • Troubleshoot specific installations
  • Ensure data comes from only one source

Usage Examples:
export CLAUDE_CONFIG_DIR="/path/to/specific/claude"
ccusage daily --isolated
ccusage blocks -i

This addition provides users with precise control over which Claude configuration to analyze while maintaining
full backward compatibility.

Summary by CodeRabbit

  • New Features
    • Added new commands for detailed usage reporting from isolated Claude configuration directories, including daily and session billing block reports with advanced filtering, projections, and token limit monitoring.
    • Introduced the ability to display which configuration directories are being used in various usage reports.
  • Improvements
    • Enhanced reporting commands to provide clearer feedback about the source of configuration data.
    • Improved support for handling multiple configuration paths and isolated environments across commands.
  • Bug Fixes
    • Improved error handling and user feedback when configuration directories are missing or invalid.

@coderabbitai
Copy link

coderabbitai bot commented Jun 21, 2025

Walkthrough

This update introduces new commands, notably blocks-isolated and isolated, which generate usage reports grouped by session billing blocks and daily usage, respectively, using only isolated Claude configuration directories. Supporting functions and types are added or updated to handle isolated paths, and several commands now display which Claude configuration directories are being used in their reports.

Changes

File(s) Change Summary
src/commands/blocks-isolated.ts New command blocks-isolated for usage reports grouped by session billing blocks from isolated Claude config directories.
src/commands/isolated.ts New command isolated for daily usage reports using only isolated Claude config directories.
src/commands/index.ts Registers new blocks-isolated and isolated commands in the CLI command map.
src/data-loader.ts Adds getIsolatedClaudePaths() for retrieving only isolated Claude config directories; updates LoadOptions to accept multiple paths.
src/debug.ts Updates detectMismatches() to accept multiple Claude paths for mismatch detection.
src/commands/blocks.ts,
src/commands/daily.ts,
src/commands/monthly.ts,
src/commands/session.ts
Adds logging to show which Claude config directories are being used for reports.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI
    participant blocksIsolatedCommand
    participant dataLoader

    User->>CLI: Run "blocks-isolated" command
    CLI->>blocksIsolatedCommand: Invoke run()
    blocksIsolatedCommand->>dataLoader: getIsolatedClaudePaths()
    dataLoader-->>blocksIsolatedCommand: Return isolated Claude paths
    blocksIsolatedCommand->>dataLoader: Load session block data from paths
    dataLoader-->>blocksIsolatedCommand: Return session block data
    blocksIsolatedCommand->>blocksIsolatedCommand: Filter/process data, compute metrics
    blocksIsolatedCommand-->>User: Output usage report (JSON or table)
Loading

Possibly related PRs

  • ryoppippi/ccusage#80: Adds a blocks command for usage grouped by billing blocks; related by similar block-reporting logic but uses default/mixed config paths.
  • ryoppippi/ccusage#70: Removes the --path CLI option and enforces using CLAUDE_CONFIG_DIR for specifying Claude data directories; closely related due to environment variable handling for config paths.
  • ryoppippi/ccusage#122: Implements multi-directory support for Claude data, enhancing how config directories are resolved and aggregated; this PR builds on that by focusing on isolated-path-only loading.

Suggested reviewers

  • ryoppippi

Poem

In a warren of configs, the rabbit did hop,
Through isolated paths, it made a quick stop.
With blocks and daily tallies, it counted each byte,
Reporting with clarity, making usage insight bright.
Now Claude’s secrets are easy to see—
Thanks to new commands, as clear as can be!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @retroryan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces new dedicated commands (isolated and blocks-isolated) that allow users to analyze Claude usage data exclusively from directories specified by the CLAUDE_CONFIG_DIR environment variable. This provides precise control for targeted analysis, such as separating personal and work usage. Additionally, it enhances the output of existing daily, monthly, session, and blocks commands by displaying which Claude configuration directories are being used, improving transparency regarding data sources.

Highlights

  • New Isolated Commands: Introduced isolated (for daily usage) and blocks-isolated (for session blocks) commands, enabling usage analysis restricted to paths defined by the CLAUDE_CONFIG_DIR environment variable. These commands provide targeted analysis capabilities.
  • Enhanced Configuration Visibility: All main commands (daily, monthly, session, blocks, and the new isolated commands) now display header information indicating the CLAUDE_CONFIG_DIR in use and the specific paths from which data is being read, improving transparency for users.
  • Robust Environment Variable Handling: The new isolated commands include improved error handling, providing clear messages when the CLAUDE_CONFIG_DIR environment variable is not set or points to invalid directories, ensuring a better user experience.
  • JSON Output for Isolated Paths: The JSON output for isolated commands now includes an isolatedPaths field, facilitating programmatic use and integration of the specific configuration paths.
  • Support for Multiple Config Paths: The underlying data loading and debugging utilities (data-loader.ts, debug.ts) have been updated to support reading usage data from multiple specified Claude configuration directories, enhancing flexibility.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an --isolated flag across various commands, allowing users to restrict usage analysis to data within the CLAUDE_CONFIG_DIR environment variable. It also enhances the display of configuration directory information in the console output. The new blocks-isolated.ts and isolated.ts commands provide dedicated functionality for this isolated mode.

My review identified a high-severity issue in blocks-isolated.ts where the command falls back to default paths if CLAUDE_CONFIG_DIR is not properly configured, contradicting the intended "isolated" behavior. Another high-severity concern was found in src/debug.ts, where the path resolution logic for detectMismatches is inconsistent with the data loading mechanism and could lead to incorrect file discovery in non-test environments. A minor redundant check was also noted in blocks-isolated.ts.

Comment on lines +145 to +155
// Get Claude paths - try isolated first, fall back to default
let paths: string[];
let isIsolated = false;
try {
paths = getIsolatedClaudePaths();
isIsolated = true;
}
catch {
// Fall back to default behavior
paths = getClaudePaths();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The pull request description states that the --isolated flag "restricts usage analysis to only the CLAUDE_CONFIG_DIR environment variable". However, this blocks-isolated command includes a fallback to getClaudePaths() if getIsolatedClaudePaths() throws an error. This means that if CLAUDE_CONFIG_DIR is not set or is invalid, the command will still run, but it will use the default Claude paths, which contradicts the "isolated" behavior.

For true isolation, if CLAUDE_CONFIG_DIR is not properly configured, the command should exit with an error, similar to how src/commands/isolated.ts handles this scenario. This ensures that the --isolated flag always guarantees data comes only from the specified CLAUDE_CONFIG_DIR.

		// Get isolated Claude paths (will throw if not configured)
		let paths: string[];
		let isIsolated = false;
		try {
			paths = getIsolatedClaudePaths();
			isIsolated = true;
		}
		catch (error) {
			if (ctx.values.json) {
				log(JSON.stringify({ error: (error as Error).message }));
			}
			else {
				logger.error((error as Error).message);
			}
			process.exit(1);
		}

Comment on lines +71 to +72
// Check if this is a test path (doesn't contain projects directory)
const isTestPath = singlePath && !singlePath.includes(CLAUDE_PROJECTS_DIR_NAME);
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The isTestPath logic here is problematic. It assumes that if CLAUDE_PROJECTS_DIR_NAME is not present in the singlePath string, then singlePath itself is the directory containing the usage data. This might be true for some specific test fixtures, but it's not robust for general use.

For example, if singlePath is /home/user/.config/claude, !singlePath.includes('projects') would be true, leading claudeDir to be /home/user/.config/claude. However, the actual usage data files are expected to be in /home/user/.config/claude/projects. This inconsistency could lead to detectMismatches failing to find files in valid production configurations, as it would be looking in the wrong directory.

It would be more consistent with data-loader.ts (e.g., loadDailyUsageData) to always assume the CLAUDE_PROJECTS_DIR_NAME subdirectory for usage data, as glob will gracefully handle non-existent directories by returning an empty array.

	for (const singlePath of claudePaths) {
		const claudeDir = path.join(singlePath, CLAUDE_PROJECTS_DIR_NAME);
		const files = await glob([USAGE_DATA_GLOB_PATTERN], {
			cwd: claudeDir,
			absolute: true,
		});

if (ctx.values.active && blocks.length === 1) {
// Detailed active block view
const block = blocks[0] as SessionBlock;
if (block == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This if (block == null) check is redundant. The blocks array is filtered to contain only active blocks (lines 198-208), and if blocks.length is 0, the process exits. Therefore, if execution reaches this line, blocks[0] (and thus block) will always be defined.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
src/commands/blocks-isolated.ts (1)

10-10: Use top-level type-only import.

-import {
-	calculateBurnRate,
-	DEFAULT_SESSION_DURATION_HOURS,
-	filterRecentBlocks,
-	projectBlockUsage,
-	type SessionBlock,
-} from '../_session-blocks.ts';
+import type { SessionBlock } from '../_session-blocks.ts';
+import {
+	calculateBurnRate,
+	DEFAULT_SESSION_DURATION_HOURS,
+	filterRecentBlocks,
+	projectBlockUsage,
+} from '../_session-blocks.ts';
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59bd8e1 and 1595321.

📒 Files selected for processing (9)
  • src/commands/blocks-isolated.ts (1 hunks)
  • src/commands/blocks.ts (3 hunks)
  • src/commands/daily.ts (2 hunks)
  • src/commands/index.ts (2 hunks)
  • src/commands/isolated.ts (1 hunks)
  • src/commands/monthly.ts (2 hunks)
  • src/commands/session.ts (2 hunks)
  • src/data-loader.ts (2 hunks)
  • src/debug.ts (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (8)
src/commands/daily.ts (3)
src/data-loader.ts (1)
  • getClaudePaths (57-110)
src/_consts.ts (1)
  • CLAUDE_CONFIG_DIR_ENV (68-68)
src/logger.ts (1)
  • log (14-14)
src/commands/monthly.ts (3)
src/data-loader.ts (1)
  • getClaudePaths (57-110)
src/_consts.ts (1)
  • CLAUDE_CONFIG_DIR_ENV (68-68)
src/logger.ts (1)
  • log (14-14)
src/commands/session.ts (3)
src/data-loader.ts (1)
  • getClaudePaths (57-110)
src/_consts.ts (1)
  • CLAUDE_CONFIG_DIR_ENV (68-68)
src/logger.ts (1)
  • log (14-14)
src/commands/index.ts (2)
src/commands/blocks-isolated.ts (1)
  • blocksIsolatedCommand (104-457)
src/commands/isolated.ts (1)
  • isolatedCommand (16-192)
src/commands/blocks.ts (3)
src/data-loader.ts (1)
  • getClaudePaths (57-110)
src/_consts.ts (1)
  • CLAUDE_CONFIG_DIR_ENV (68-68)
src/logger.ts (1)
  • log (14-14)
src/debug.ts (2)
src/data-loader.ts (1)
  • getDefaultClaudePath (159-187)
src/_consts.ts (2)
  • CLAUDE_PROJECTS_DIR_NAME (74-74)
  • USAGE_DATA_GLOB_PATTERN (80-80)
src/data-loader.ts (1)
src/_consts.ts (2)
  • CLAUDE_CONFIG_DIR_ENV (68-68)
  • CLAUDE_PROJECTS_DIR_NAME (74-74)
src/commands/blocks-isolated.ts (6)
src/_session-blocks.ts (5)
  • SessionBlock (38-49)
  • DEFAULT_SESSION_DURATION_HOURS (7-7)
  • filterRecentBlocks (296-304)
  • calculateBurnRate (228-255)
  • projectBlockUsage (262-288)
src/_utils.ts (3)
  • formatModelsDisplayMultiline (342-346)
  • formatNumber (293-295)
  • formatCurrency (302-304)
src/_shared-args.ts (1)
  • sharedCommandConfig (86-89)
src/_consts.ts (5)
  • DEFAULT_RECENT_DAYS (14-14)
  • BLOCKS_WARNING_THRESHOLD (20-20)
  • CLAUDE_CONFIG_DIR_ENV (68-68)
  • BLOCKS_DEFAULT_TERMINAL_WIDTH (32-32)
  • BLOCKS_COMPACT_WIDTH_THRESHOLD (26-26)
src/logger.ts (2)
  • logger (8-8)
  • log (14-14)
src/data-loader.ts (3)
  • getIsolatedClaudePaths (118-152)
  • getClaudePaths (57-110)
  • loadSessionBlockData (1073-1178)
🪛 ESLint
src/commands/daily.ts

[error] 77-77: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 77-77: Unsafe member access .env on an error typed value.

(ts/no-unsafe-member-access)


[error] 79-79: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 79-79: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 79-79: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)


[error] 81-81: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 81-81: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 81-81: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)

src/commands/monthly.ts

[error] 88-88: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 88-88: Unsafe member access .env on an error typed value.

(ts/no-unsafe-member-access)


[error] 90-90: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 90-90: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 90-90: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)


[error] 92-92: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 92-92: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 92-92: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)

src/commands/session.ts

[error] 78-78: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 78-78: Unsafe member access .env on an error typed value.

(ts/no-unsafe-member-access)


[error] 80-80: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 80-80: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 80-80: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)


[error] 82-82: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 82-82: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 82-82: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)

src/commands/blocks.ts

[error] 359-359: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 359-359: Unsafe member access .env on an error typed value.

(ts/no-unsafe-member-access)


[error] 361-361: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 361-361: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 361-361: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)


[error] 363-363: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 363-363: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 363-363: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)

src/debug.ts

[error] 67-67: Unexpected value in conditional. A boolean expression is required.

(ts/strict-boolean-expressions)


[error] 69-69: Trailing spaces not allowed.

(style/no-trailing-spaces)


[error] 72-72: Unexpected string value in conditional. An explicit empty string check is required.

(ts/strict-boolean-expressions)


[error] 73-73: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 73-73: Unexpected value in conditional. A boolean expression is required.

(ts/strict-boolean-expressions)


[error] 73-73: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 73-73: Unsafe member access .join on an error typed value.

(ts/no-unsafe-member-access)


[error] 74-77: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 74-74: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 75-75: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 78-78: Unsafe spread of an error typed type.

(ts/no-unsafe-argument)

src/data-loader.ts

[error] 123-123: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 123-123: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 123-123: Unsafe member access .env on an error typed value.

(ts/no-unsafe-member-access)


[error] 123-123: Unsafe member access .trim on an error typed value.

(ts/no-unsafe-member-access)


[error] 130-130: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 130-130: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 130-130: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 130-130: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 130-130: Unsafe member access .split on an error typed value.

(ts/no-unsafe-member-access)


[error] 130-130: Unsafe member access .map on an error typed value.

(ts/no-unsafe-member-access)


[error] 130-130: Unsafe return of a value of type any.

(ts/no-unsafe-return)


[error] 130-130: Unsafe call of a(n) any typed value.

(ts/no-unsafe-call)


[error] 130-130: Unsafe member access .trim on an any value.

(ts/no-unsafe-member-access)


[error] 130-130: Unsafe member access .filter on an error typed value.

(ts/no-unsafe-member-access)


[error] 132-132: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 132-132: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 132-132: Unsafe member access .resolve on an error typed value.

(ts/no-unsafe-member-access)


[error] 133-133: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 133-133: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 134-134: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 134-134: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 134-134: Unsafe member access .join on an error typed value.

(ts/no-unsafe-member-access)


[error] 135-135: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 135-135: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 137-137: Unsafe argument of type error typed assigned to a parameter of type string.

(ts/no-unsafe-argument)


[error] 138-138: Unsafe argument of type error typed assigned to a parameter of type string.

(ts/no-unsafe-argument)


[error] 139-139: Unsafe argument of type error typed assigned to a parameter of type string.

(ts/no-unsafe-argument)

src/commands/isolated.ts

[error] 16-192: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 16-16: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 21-21: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 21-21: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 22-22: Unsafe member access .level on an error typed value.

(ts/no-unsafe-member-access)


[error] 31-31: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 31-31: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 32-32: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 35-35: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 35-35: Unsafe member access .error on an error typed value.

(ts/no-unsafe-member-access)


[error] 37-37: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 37-37: Unsafe member access .exit on an error typed value.

(ts/no-unsafe-member-access)


[error] 42-42: Unsafe assignment of an any value.

(ts/no-unsafe-assignment)


[error] 42-42: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 43-43: Unsafe assignment of an any value.

(ts/no-unsafe-assignment)


[error] 43-43: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 44-44: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 45-45: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 46-46: Unsafe assignment of an any value.

(ts/no-unsafe-assignment)


[error] 46-46: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 50-50: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 50-50: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 51-51: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 54-54: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 54-54: Unsafe member access .warn on an error typed value.

(ts/no-unsafe-member-access)


[error] 56-56: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 56-56: Unsafe member access .exit on an error typed value.

(ts/no-unsafe-member-access)


[error] 63-63: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 63-63: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 63-63: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 63-63: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 65-65: Unsafe argument of type any assigned to a parameter of type number.

(ts/no-unsafe-argument)


[error] 65-65: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 68-68: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 68-68: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 73-73: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 73-73: Unsafe member access .date on an error typed value.

(ts/no-unsafe-member-access)


[error] 74-74: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 74-74: Unsafe member access .inputTokens on an error typed value.

(ts/no-unsafe-member-access)


[error] 75-75: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 75-75: Unsafe member access .outputTokens on an error typed value.

(ts/no-unsafe-member-access)


[error] 76-76: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 76-76: Unsafe member access .cacheCreationTokens on an error typed value.

(ts/no-unsafe-member-access)


[error] 77-77: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 77-77: Unsafe member access .cacheReadTokens on an error typed value.

(ts/no-unsafe-member-access)


[error] 78-78: Unsafe argument of type error typed assigned to a parameter of type TokenData.

(ts/no-unsafe-argument)


[error] 79-79: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 79-79: Unsafe member access .totalCost on an error typed value.

(ts/no-unsafe-member-access)


[error] 80-80: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 80-80: Unsafe member access .modelsUsed on an error typed value.

(ts/no-unsafe-member-access)


[error] 81-81: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 81-81: Unsafe member access .modelBreakdowns on an error typed value.

(ts/no-unsafe-member-access)


[error] 85-85: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 89-89: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 89-89: Unsafe member access .box on an error typed value.

(ts/no-unsafe-member-access)


[error] 92-92: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 92-92: Unsafe member access .env on an error typed value.

(ts/no-unsafe-member-access)


[error] 93-93: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 93-93: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 93-93: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)


[error] 94-94: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 94-94: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 94-94: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)


[error] 142-151: Unsafe argument of type any[] assigned to a parameter of type TableRow.

(ts/no-unsafe-argument)


[error] 143-143: Unsafe member access .date on an error typed value.

(ts/no-unsafe-member-access)


[error] 144-144: Unsafe argument of type error typed assigned to a parameter of type string[].

(ts/no-unsafe-argument)


[error] 144-144: Unsafe member access .modelsUsed on an error typed value.

(ts/no-unsafe-member-access)


[error] 145-145: Unsafe argument of type error typed assigned to a parameter of type number.

(ts/no-unsafe-argument)


[error] 145-145: Unsafe member access .inputTokens on an error typed value.

(ts/no-unsafe-member-access)


[error] 146-146: Unsafe argument of type error typed assigned to a parameter of type number.

(ts/no-unsafe-argument)


[error] 146-146: Unsafe member access .outputTokens on an error typed value.

(ts/no-unsafe-member-access)


[error] 147-147: Unsafe argument of type error typed assigned to a parameter of type number.

(ts/no-unsafe-argument)


[error] 147-147: Unsafe member access .cacheCreationTokens on an error typed value.

(ts/no-unsafe-member-access)


[error] 148-148: Unsafe argument of type error typed assigned to a parameter of type number.

(ts/no-unsafe-argument)


[error] 148-148: Unsafe member access .cacheReadTokens on an error typed value.

(ts/no-unsafe-member-access)


[error] 149-149: Unsafe argument of type error typed assigned to a parameter of type TokenData.

(ts/no-unsafe-argument)


[error] 150-150: Unsafe argument of type error typed assigned to a parameter of type number.

(ts/no-unsafe-argument)


[error] 150-150: Unsafe member access .totalCost on an error typed value.

(ts/no-unsafe-member-access)


[error] 154-154: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 154-154: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 155-155: Unsafe argument of type error typed assigned to a parameter of type { modelName: string; inputTokens: number; outputTokens: number; cacheCreationTokens: number; cacheReadTokens: number; cost: number; }[].

(ts/no-unsafe-argument)


[error] 155-155: Unsafe member access .modelBreakdowns on an error typed value.

(ts/no-unsafe-member-access)


[error] 172-181: Unsafe argument of type any[] assigned to a parameter of type TableRow.

(ts/no-unsafe-argument)


[error] 173-173: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 173-173: Unsafe member access .yellow on an error typed value.

(ts/no-unsafe-member-access)


[error] 175-175: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 175-175: Unsafe member access .yellow on an error typed value.

(ts/no-unsafe-member-access)


[error] 176-176: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 176-176: Unsafe member access .yellow on an error typed value.

(ts/no-unsafe-member-access)


[error] 177-177: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 177-177: Unsafe member access .yellow on an error typed value.

(ts/no-unsafe-member-access)


[error] 178-178: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 178-178: Unsafe member access .yellow on an error typed value.

(ts/no-unsafe-member-access)


[error] 179-179: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 179-179: Unsafe member access .yellow on an error typed value.

(ts/no-unsafe-member-access)


[error] 180-180: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 180-180: Unsafe member access .yellow on an error typed value.

(ts/no-unsafe-member-access)


[error] 183-183: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 187-187: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 187-187: Unsafe member access .info on an error typed value.

(ts/no-unsafe-member-access)


[error] 188-188: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 188-188: Unsafe member access .info on an error typed value.

(ts/no-unsafe-member-access)

src/commands/blocks-isolated.ts

[error] 10-10: Prefer using a top-level type-only import instead of inline type specifiers.

(import/consistent-type-specifier-style)


[error] 104-457: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 104-104: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 107-132: Unsafe assignment of an any value.

(ts/no-unsafe-assignment)


[error] 135-135: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 135-135: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 136-136: Unsafe member access .level on an error typed value.

(ts/no-unsafe-member-access)


[error] 140-140: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 141-141: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 141-141: Unsafe member access .error on an error typed value.

(ts/no-unsafe-member-access)


[error] 142-142: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 142-142: Unsafe member access .exit on an error typed value.

(ts/no-unsafe-member-access)


[error] 159-159: Unsafe assignment of an any value.

(ts/no-unsafe-assignment)


[error] 159-159: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 160-160: Unsafe assignment of an any value.

(ts/no-unsafe-assignment)


[error] 160-160: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 161-161: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 162-162: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 163-163: Unsafe assignment of an any value.

(ts/no-unsafe-assignment)


[error] 163-163: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 164-164: Unsafe assignment of an any value.

(ts/no-unsafe-assignment)


[error] 164-164: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 168-168: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 168-168: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 169-169: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 172-172: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 172-172: Unsafe member access .warn on an error typed value.

(ts/no-unsafe-member-access)


[error] 174-174: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 174-174: Unsafe member access .exit on an error typed value.

(ts/no-unsafe-member-access)


[error] 179-179: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 188-188: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 188-188: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 189-189: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 189-189: Unsafe member access .info on an error typed value.

(ts/no-unsafe-member-access)


[error] 194-194: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 194-194: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 198-198: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 198-198: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 201-201: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 201-201: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 202-202: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 205-205: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 205-205: Unsafe member access .info on an error typed value.

(ts/no-unsafe-member-access)


[error] 207-207: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 207-207: Unsafe member access .exit on an error typed value.

(ts/no-unsafe-member-access)


[error] 211-211: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 211-211: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 236-236: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 238-238: Unsafe argument of type any assigned to a parameter of type string | undefined.

(ts/no-unsafe-argument)


[error] 238-238: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 255-255: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 259-259: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 259-259: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 263-263: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 263-263: Unsafe member access .warn on an error typed value.

(ts/no-unsafe-member-access)


[error] 264-264: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 264-264: Unsafe member access .exit on an error typed value.

(ts/no-unsafe-member-access)


[error] 269-269: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 269-269: Unsafe member access .box on an error typed value.

(ts/no-unsafe-member-access)


[error] 279-279: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 279-279: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 279-279: Unsafe member access .cyan on an error typed value.

(ts/no-unsafe-member-access)


[error] 279-279: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 279-279: Unsafe member access .yellow on an error typed value.

(ts/no-unsafe-member-access)


[error] 280-280: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 280-280: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 280-280: Unsafe member access .green on an error typed value.

(ts/no-unsafe-member-access)


[error] 282-282: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 282-282: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 282-282: Unsafe member access .bold on an error typed value.

(ts/no-unsafe-member-access)


[error] 283-283: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 284-284: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 285-285: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 288-288: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 288-288: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 288-288: Unsafe member access .bold on an error typed value.

(ts/no-unsafe-member-access)


[error] 289-289: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 290-290: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 294-294: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 294-294: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 294-294: Unsafe member access .bold on an error typed value.

(ts/no-unsafe-member-access)


[error] 295-295: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 296-296: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 298-298: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 300-300: Unsafe argument of type any assigned to a parameter of type string | undefined.

(ts/no-unsafe-argument)


[error] 300-300: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 305-309: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 306-306: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 306-306: Unsafe member access .red on an error typed value.

(ts/no-unsafe-member-access)


[error] 308-308: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 308-308: Unsafe member access .yellow on an error typed value.

(ts/no-unsafe-member-access)


[error] 309-309: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 309-309: Unsafe member access .green on an error typed value.

(ts/no-unsafe-member-access)


[error] 311-311: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 311-311: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 311-311: Unsafe member access .bold on an error typed value.

(ts/no-unsafe-member-access)


[error] 312-312: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 313-313: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 314-314: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 315-315: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 321-321: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 321-321: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 321-321: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)


[error] 326-326: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 326-326: Unsafe member access .box on an error typed value.

(ts/no-unsafe-member-access)


[error] 330-330: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 330-330: Unsafe member access .env on an error typed value.

(ts/no-unsafe-member-access)


[error] 331-331: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 331-331: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 331-331: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)


[error] 332-332: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 332-332: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 332-332: Unsafe member access .dim on an error typed value.

(ts/no-unsafe-member-access)


[error] 336-336: Unsafe argument of type any assigned to a parameter of type string | undefined.

(ts/no-unsafe-argument)


[error] 336-336: Unsafe member access .values on an any value.

(ts/no-unsafe-member-access)


[error] 357-357: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 357-357: Unexpected any value in conditional. An explicit comparison or type conversion is required.

(ts/strict-boolean-expressions)


[error] 357-357: Unsafe member access .stdout on an error typed value.

(ts/no-unsafe-member-access)


[error] 364-364: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 364-364: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 365-365: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 365-365: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 366-366: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 366-366: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 367-367: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 367-367: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 370-370: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 370-370: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 372-372: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 372-372: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 373-373: Unsafe argument of type any[] assigned to a parameter of type TableRow.

(ts/no-unsafe-argument)


[error] 378-378: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 378-378: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 378-378: Unsafe member access .green on an error typed value.

(ts/no-unsafe-member-access)


[error] 391-391: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 391-391: Unsafe member access .red on an error typed value.

(ts/no-unsafe-member-access)


[error] 395-395: Unsafe argument of type any[] assigned to a parameter of type TableRow.

(ts/no-unsafe-argument)


[error] 403-405: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 405-405: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 405-405: Unsafe member access .red on an error typed value.

(ts/no-unsafe-member-access)


[error] 409-411: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 411-411: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 411-411: Unsafe member access .red on an error typed value.

(ts/no-unsafe-member-access)


[error] 414-414: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 414-414: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 414-414: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 415-415: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 415-415: Unsafe member access .blue on an error typed value.

(ts/no-unsafe-member-access)


[error] 421-421: Unsafe argument of type any[] assigned to a parameter of type TableRow.

(ts/no-unsafe-argument)


[error] 428-430: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 429-429: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 429-429: Unsafe member access .red on an error typed value.

(ts/no-unsafe-member-access)


[error] 433-433: Unsafe assignment of an error typed value.

(ts/no-unsafe-assignment)


[error] 433-433: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 433-433: Unsafe member access .gray on an error typed value.

(ts/no-unsafe-member-access)


[error] 434-434: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 434-434: Unsafe member access .yellow on an error typed value.

(ts/no-unsafe-member-access)


[error] 447-447: Unsafe argument of type any[] assigned to a parameter of type TableRow.

(ts/no-unsafe-argument)


[error] 453-453: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)

🔇 Additional comments (14)
src/data-loader.ts (2)

112-152: LGTM! Well-implemented isolated mode functionality.

The getIsolatedClaudePaths() function correctly implements the isolated mode by:

  • Only using environment variable paths (no fallback to defaults)
  • Providing clear error messages when CLAUDE_CONFIG_DIR is unset
  • Following the same path validation and deduplication logic as getClaudePaths()
  • Supporting comma-separated paths as documented

The implementation aligns perfectly with the PR objectives for targeted analysis of specific Claude installations.


676-676: Approve the LoadOptions type enhancement.

The change to allow claudePath to accept either string | string[] is well-designed:

  • Maintains backward compatibility with existing single-path usage
  • Supports the new multiple-path functionality for isolated mode
  • Works seamlessly with the existing toArray() helper used throughout the codebase
src/commands/index.ts (2)

4-4: LGTM: Clean import additions

The new command imports follow the established import pattern and are properly organized.

Also applies to: 7-7


20-21: LGTM: Consistent command registration

The new commands are properly registered in the subCommands map following the existing pattern.

src/commands/daily.ts (2)

4-4: LGTM: Appropriate imports for config directory display

The imports correctly add the necessary constants and functions for displaying Claude configuration directory information.

Also applies to: 12-12


74-82: LGTM: Consistent config directory information display

The implementation correctly shows users which Claude configuration directories are being used, enhancing transparency. The logic properly handles both environment variable presence and path display.

Note: The static analysis errors about "unsafe assignment" and "unsafe member access" on process.env appear to be false positives, as process.env[key] returns string | undefined which is handled correctly here.

src/commands/monthly.ts (2)

4-4: LGTM: Consistent import pattern

The imports match the pattern established in other commands for config directory functionality.

Also applies to: 12-12


85-93: LGTM: Consistent config directory display implementation

The config directory information display follows the same pattern as other commands, providing consistent user experience across all reports.

src/commands/blocks.ts (2)

4-4: LGTM: Standard import additions

The imports follow the established pattern for config directory functionality.

Also applies to: 14-14


356-364: LGTM: Appropriate placement of config directory information

The config directory display is correctly placed in the table view section, maintaining consistency with other commands while respecting the blocks command's unique dual display modes.

src/commands/session.ts (2)

4-4: LGTM: Completing the consistent import pattern

The imports maintain consistency with the other command files for config directory functionality.

Also applies to: 12-12


75-83: LGTM: Excellent consistency across all commands

This completes the consistent implementation of config directory information display across all command files. Users will now have clear visibility into which Claude configuration directories are being used for their reports, enhancing transparency and debugging capabilities.

The uniform pattern across daily, monthly, session, and blocks commands provides a cohesive user experience.

src/debug.ts (1)

67-79: Implementation correctly handles multiple Claude paths.

The conversion of claudePath parameter to support both single string and array of strings is well-implemented. The logic properly normalizes the input to an array format and aggregates files from all specified paths.

src/commands/isolated.ts (1)

16-192: Well-implemented isolated daily usage command.

The command correctly implements all the requirements:

  • Uses getIsolatedClaudePaths() exclusively without fallback
  • Provides clear error messages when CLAUDE_CONFIG_DIR is not configured
  • Includes isolatedPaths in JSON output
  • Shows "Isolated Daily" in the report title
  • Displays the environment variable and paths being used

});
const claudePaths = claudePath ? (Array.isArray(claudePath) ? claudePath : [claudePath]) : [getDefaultClaudePath()];
const allFiles: string[] = [];

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove trailing space.

-	const allFiles: string[] = [];
-	
+	const allFiles: string[] = [];
+
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const allFiles: string[] = [];
🧰 Tools
🪛 ESLint

[error] 69-69: Trailing spaces not allowed.

(style/no-trailing-spaces)

🤖 Prompt for AI Agents
In src/debug.ts at line 69, there is a trailing space that should be removed.
Edit the line to delete any extra whitespace at the end to ensure clean
formatting.

Comment on lines +145 to +156
// Get Claude paths - try isolated first, fall back to default
let paths: string[];
let isIsolated = false;
try {
paths = getIsolatedClaudePaths();
isIsolated = true;
}
catch {
// Fall back to default behavior
paths = getClaudePaths();
}

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove fallback to default paths for consistency.

The blocks-isolated command should exclusively use isolated paths, similar to the isolated command. The current fallback behavior contradicts the command's purpose and could confuse users.

-		// Get Claude paths - try isolated first, fall back to default
-		let paths: string[];
-		let isIsolated = false;
-		try {
-			paths = getIsolatedClaudePaths();
-			isIsolated = true;
-		}
-		catch {
-			// Fall back to default behavior
-			paths = getClaudePaths();
-		}
+		// Get isolated Claude paths (will throw if not configured)
+		let paths: string[];
+		let isIsolated = true;
+		try {
+			paths = getIsolatedClaudePaths();
+		}
+		catch (error) {
+			if (ctx.values.json) {
+				log(JSON.stringify({ error: (error as Error).message }));
+			}
+			else {
+				logger.error((error as Error).message);
+			}
+			process.exit(1);
+		}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Get Claude paths - try isolated first, fall back to default
let paths: string[];
let isIsolated = false;
try {
paths = getIsolatedClaudePaths();
isIsolated = true;
}
catch {
// Fall back to default behavior
paths = getClaudePaths();
}
// Get isolated Claude paths (will throw if not configured)
let paths: string[];
let isIsolated = true;
try {
paths = getIsolatedClaudePaths();
}
catch (error) {
if (ctx.values.json) {
log(JSON.stringify({ error: (error as Error).message }));
}
else {
logger.error((error as Error).message);
}
process.exit(1);
}
🤖 Prompt for AI Agents
In src/commands/blocks-isolated.ts around lines 145 to 156, remove the fallback
to default Claude paths in the try-catch block. Instead, directly assign paths
using getIsolatedClaudePaths() without catching errors or falling back, ensuring
the command exclusively uses isolated paths for consistency with its intended
behavior.


export const blocksIsolatedCommand = define({
name: 'blocks-isolated',
description: 'Show usage report grouped by session billing blocks (prioritizes CLAUDE_CONFIG_DIR if set)',
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Update command description to reflect exclusive isolated behavior.

The current description "prioritizes CLAUDE_CONFIG_DIR if set" is misleading if the command should exclusively use isolated paths.

-	description: 'Show usage report grouped by session billing blocks (prioritizes CLAUDE_CONFIG_DIR if set)',
+	description: 'Show usage report grouped by session billing blocks from CLAUDE_CONFIG_DIR only',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
description: 'Show usage report grouped by session billing blocks (prioritizes CLAUDE_CONFIG_DIR if set)',
description: 'Show usage report grouped by session billing blocks from CLAUDE_CONFIG_DIR only',
🤖 Prompt for AI Agents
In src/commands/blocks-isolated.ts at line 106, update the command description
to clearly state that it exclusively uses isolated paths instead of mentioning
prioritizing CLAUDE_CONFIG_DIR. Replace the current description with one that
accurately reflects the exclusive isolated behavior of the command.

log(JSON.stringify({ blocks: [] }));
}
else {
logger.warn('No Claude usage data found in isolated directories.');
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix incorrect warning message.

The warning assumes isolated directories even when the code might have fallen back to default paths.

-				logger.warn('No Claude usage data found in isolated directories.');
+				logger.warn(isIsolated ? 'No Claude usage data found in isolated directories.' : 'No Claude usage data found.');

Note: This fix is only needed if you keep the fallback behavior. If you remove the fallback as suggested above, the current message would be correct.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
logger.warn('No Claude usage data found in isolated directories.');
logger.warn(isIsolated
? 'No Claude usage data found in isolated directories.'
: 'No Claude usage data found.');
🧰 Tools
🪛 ESLint

[error] 172-172: Unsafe call of a(n) error type typed value.

(ts/no-unsafe-call)


[error] 172-172: Unsafe member access .warn on an error typed value.

(ts/no-unsafe-member-access)

🤖 Prompt for AI Agents
In src/commands/blocks-isolated.ts at line 172, the warning message incorrectly
states "No Claude usage data found in isolated directories" even when the code
may have fallen back to default paths. Update the warning message to accurately
reflect whether the data was searched in isolated directories or default paths,
or make it more generic to cover both cases if fallback behavior is retained.

@retroryan retroryan marked this pull request as draft June 21, 2025 23:13
@retroryan retroryan closed this Jun 21, 2025
@retroryan retroryan deleted the show-claude-config branch June 21, 2025 23:19
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.

1 participant