ai-project-manage-cli 6.0.26 → 6.0.27
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/dist/index.js +5 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -525,13 +525,10 @@ function formatSessionMessagesXml(sessionId, messages) {
|
|
|
525
525
|
import { existsSync as existsSync2, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
526
526
|
import { join as join4 } from "path";
|
|
527
527
|
var MANIFEST_FILE = ".sync-manifest.json";
|
|
528
|
-
async function downloadAttachment(cfg,
|
|
528
|
+
async function downloadAttachment(cfg, attachmentId) {
|
|
529
529
|
const base = cfg.baseUrl.trim().replace(/\/+$/, "");
|
|
530
|
-
const
|
|
531
|
-
const
|
|
532
|
-
const res = await fetch(url, {
|
|
533
|
-
headers: { Authorization: `Bearer ${cfg.token}` }
|
|
534
|
-
});
|
|
530
|
+
const url = `${base}/api/v1/tasks/attachments/file?${new URLSearchParams({ attachmentId })}`;
|
|
531
|
+
const res = await fetch(url);
|
|
535
532
|
if (!res.ok) {
|
|
536
533
|
throw new Error(
|
|
537
534
|
`[apm] \u4E0B\u8F7D\u9644\u4EF6\u5931\u8D25 (${res.status}): attachmentId=${attachmentId}`
|
|
@@ -589,7 +586,7 @@ async function syncSessionAttachments(cfg, sessionId, attachments, apmRoot) {
|
|
|
589
586
|
);
|
|
590
587
|
continue;
|
|
591
588
|
}
|
|
592
|
-
const buffer = await downloadAttachment(cfg,
|
|
589
|
+
const buffer = await downloadAttachment(cfg, item.id);
|
|
593
590
|
writeFileSync3(dest, buffer);
|
|
594
591
|
nextManifest.attachments[item.id] = {
|
|
595
592
|
name: item.name,
|
|
@@ -2646,7 +2643,7 @@ function registerDeployCommands(program) {
|
|
|
2646
2643
|
function buildProgram() {
|
|
2647
2644
|
const program = new Command();
|
|
2648
2645
|
program.name("apm").description(
|
|
2649
|
-
|
|
2646
|
+
`\u6BD4\u90BB\u661F\u56FE\u547D\u4EE4\u884C\uFF08\u4F1A\u8BDD\u5DE5\u4F5C\u533A\u4E0E\u7814\u53D1\u81EA\u52A8\u5316\uFF09\u3002
|
|
2650
2647
|
\u672A\u4F20 --server \u65F6\u4F18\u5148\u4F7F\u7528\u73AF\u5883\u53D8\u91CF AI_PM_SERVER\uFF0C\u5426\u5219\u9ED8\u8BA4 ${DEFAULT_BASE_URL}\u3002`
|
|
2651
2648
|
).version(readCliVersion(), "-V, --version", "\u663E\u793A\u7248\u672C\u53F7").helpOption("-h, --help", "\u663E\u793A\u5E2E\u52A9").showHelpAfterError(true);
|
|
2652
2649
|
program.command("login").description(
|