@2kw/ai 8.4.0-dev.10 → 8.4.0-dev.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  import { Command } from "commander";
2
2
  import { getClient, runAction } from "../lib/client.js";
3
+ import { CliUsageError } from "../lib/errors.js";
3
4
  import { formatDetail, formatSuccess } from "../lib/output.js";
4
5
  export function makeConversationsCommand() {
5
6
  const cmd = new Command("conversations").description("Manage conversations");
@@ -119,11 +120,17 @@ export function makeConversationsCommand() {
119
120
  .command("list")
120
121
  .description("List a conversation's items, oldest first")
121
122
  .argument("<conversationId>", "Conversation ID")
122
- .action(async (conversationId, _opts, command) => {
123
+ .option("--after <responseId>", "List the responses after this one (the response_id of the last item listed)")
124
+ .option("--limit <n>", "Most responses per page, 1 to 100 (default 20)")
125
+ .action(async (conversationId, opts, command) => {
123
126
  await runAction(command, async () => {
127
+ const limit = opts.limit === undefined ? undefined : Number(opts.limit);
128
+ if (limit !== undefined && !(/^\d+$/.test(opts.limit) && limit >= 1 && limit <= 100)) {
129
+ throw new CliUsageError(`--limit must be a whole number between 1 and 100, not '${opts.limit}'`);
130
+ }
124
131
  const client = getClient(command);
125
132
  const { data } = await client.GET("/v1/conversations/{conversationId}/items", {
126
- params: { path: { conversationId } },
133
+ params: { path: { conversationId }, query: { after: opts.after, limit } },
127
134
  });
128
135
  formatDetail(data, command);
129
136
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2kw/ai",
3
- "version": "8.4.0-dev.10",
3
+ "version": "8.4.0-dev.16",
4
4
  "description": "CLI for 2kw.ai — schema-driven document extraction, an OpenAI-compatible EU LLM gateway, transcription, prompts, datasets, and experiments from your terminal or agentic workflows. Ships as 2kw, backbone, and bb.",
5
5
  "keywords": [
6
6
  "cli",