Files
agenticCode/ac-cli/src/main/java/com/agenticcode/cli/StoreCommand.java
Ingo Schnabel 10971915e9 Typescript
2026-09-23 08:15:53 +02:00

27 lines
927 B
Java

package com.agenticcode.cli;
import org.jspecify.annotations.Nullable;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
/**
* Item 194: the frontend Redux store — its slices, their state keys and access counts.
*/
@Command(name = "store", mixinStandardHelpOptions = true,
description = "List the project's Redux store slices (reducer key, state keys with types and read/write counts, reducers)")
final class StoreCommand extends AbstractProjectCommand {
@Option(names = "--slice", description = "Only this slice (reducer key or RTK slice name)")
@Nullable String slice;
@Override
public Integer call() throws Exception {
try {
return printResponse(apiClient().get(appendQuery(projectPath() + "/store", "slice", slice)));
} catch (IllegalStateException e) {
System.err.println(e.getMessage());
return 1;
}
}
}