@nextxai/cli 0.3.8 → 0.3.10
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.
- package/CHANGELOG.md +8 -0
- package/dist/ai/client.js +1 -1
- package/dist/commands/ai.js +1 -1
- package/dist/commands/auth.js +1 -1
- package/dist/repl/App.js +1 -1
- package/dist/repl/slash.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.10
|
|
4
|
+
|
|
5
|
+
- AI usage now shows questions per week instead of turns per month.
|
|
6
|
+
|
|
7
|
+
## 0.3.9
|
|
8
|
+
|
|
9
|
+
- The assistant now answers with the commands of the CLI you are using.
|
|
10
|
+
|
|
3
11
|
## 0.3.8
|
|
4
12
|
|
|
5
13
|
- A workspace without an AI plan can still ask how-to questions in chat and with `-p`, up to the free daily limit.
|
package/dist/ai/client.js
CHANGED
|
@@ -126,7 +126,7 @@ export async function ask(input) {
|
|
|
126
126
|
imageKeys: input.attachments?.filter((a) => a.imageKey).map((a) => a.imageKey) ?? undefined,
|
|
127
127
|
fileKeys: input.attachments?.filter((a) => a.fileKey).map((a) => a.fileKey) ?? undefined,
|
|
128
128
|
agentCode: input.agent,
|
|
129
|
-
clientPlatform:
|
|
129
|
+
clientPlatform: `cli-${brand().bin}`,
|
|
130
130
|
...(mode ? { mode } : {}),
|
|
131
131
|
};
|
|
132
132
|
let lastErr;
|
package/dist/commands/ai.js
CHANGED
|
@@ -575,7 +575,7 @@ export function registerAi(program) {
|
|
|
575
575
|
const list = await get("/ai/agents");
|
|
576
576
|
emit(list, () => info(table(["Code", tr("Tên", "Name"), tr("Trạng thái", "Status"), tr("Mô tả", "Description")], list.map((a) => [a.code, a.name, a.status === "available" ? c.green(a.status) : c.dim(`${a.status}${a.requiredPlanName ? ` (${a.requiredPlanName})` : ""}`), a.description.slice(0, 60)]))));
|
|
577
577
|
});
|
|
578
|
-
ai.command("usage").description(tr("
|
|
578
|
+
ai.command("usage").description(tr("câu AI tuần này", "AI questions this week"))
|
|
579
579
|
.action(async () => {
|
|
580
580
|
const u = await (await import("../ai/client.js")).usage();
|
|
581
581
|
emit(u, () => info(`${tr("Gói", "Plan")} ${c.bold(u.planName ?? "-")} · ${tr("đã dùng", "used")} ${u.used ?? 0}${u.limit ? `/${u.limit}` : ""} · ${tr("mở lại", "resets")} ${u.resetsAt?.slice(0, 10) ?? ""}`));
|
package/dist/commands/auth.js
CHANGED
|
@@ -63,7 +63,7 @@ export function registerAuth(program) {
|
|
|
63
63
|
emit({ user: { name: r.userName, email: r.userEmail }, workspace: r.workspaceName, env: context().env, via: r.session.via, ai: u ?? null }, () => {
|
|
64
64
|
printLogin(r);
|
|
65
65
|
if (u)
|
|
66
|
-
info(` ${tr("Gói AI", "AI plan")} ${c.bold(u.planName ?? "-")}${u.limit ? ` · ${tr("
|
|
66
|
+
info(` ${tr("Gói AI", "AI plan")} ${c.bold(u.planName ?? "-")}${u.limit ? ` · ${tr("đã dùng", "used")} ${u.used}/${u.limit}` : ""}`);
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
program
|
package/dist/repl/App.js
CHANGED
|
@@ -114,7 +114,7 @@ export function App(props) {
|
|
|
114
114
|
const profile = () => getProfile(context().profile);
|
|
115
115
|
const refreshUsage = useCallback(() => {
|
|
116
116
|
fetchUsage()
|
|
117
|
-
.then((u) => setUsageText(u.limit ? `${u.planName ?? ""} · ${u.
|
|
117
|
+
.then((u) => setUsageText(u.limit ? `${u.planName ?? ""} · ${Math.max(0, u.limit - (u.used ?? 0))}/${u.limit} ${tr("câu tuần này", "questions this week")}` : (u.planName ?? "")))
|
|
118
118
|
.catch(() => undefined);
|
|
119
119
|
}, []);
|
|
120
120
|
// ── header, once ──────────────────────────────────────────────────────────────────────────────
|
package/dist/repl/slash.js
CHANGED
|
@@ -22,7 +22,7 @@ export const SLASH = [
|
|
|
22
22
|
{ name: "library", description: () => tr("Ảnh, tài liệu, tệp AI đã tạo", "Images, documents and files the AI produced"), platforms: ["nextx"] },
|
|
23
23
|
{ name: "export", args: "md|json [file]", description: () => tr("Xuất hội thoại ra Markdown / JSON", "Export the conversation to Markdown / JSON") },
|
|
24
24
|
{ name: "tools", description: () => tr("Công cụ AI bạn đang được dùng (theo quyền thật)", "AI tools you can use (by your real permissions)") },
|
|
25
|
-
{ name: "usage", description: () => brand().platform === "nextx" ? tr("
|
|
25
|
+
{ name: "usage", description: () => brand().platform === "nextx" ? tr("Câu AI tuần này", "AI questions this week") : tr("Câu hỏi AI còn lại tuần này", "AI questions left this week") },
|
|
26
26
|
{ name: "feedback", args: "up|down", description: () => tr("Báo câu trả lời vừa rồi tốt / chưa tốt", "Rate the last answer") },
|
|
27
27
|
{ name: "support", args: "<problem>", description: () => tr("Chuyển cho nhân viên hỗ trợ (mở ticket)", "Hand over to a support agent (ticket)"), platforms: ["nextx"] },
|
|
28
28
|
{ name: "status", description: () => tr("Tài khoản, workspace, môi trường, phiên bản", "Account, workspace, environment, version") },
|