Commit Graph

3 Commits

Author SHA1 Message Date
hongjr03 33de8901e7 fix(hub): docmind client uses stream upload + correct API response parsing
Two fixes discovered by real end-to-end smoke test against Aliyun docmind:

1. fileUrlObject must be a ReadStream, not a Buffer. The SDK serializes
   Buffers as JSON {type:'Buffer',data:[...]} which the API can't read;
   a Stream is uploaded as multipart form data. Switched readFile → createReadStream.

2. QueryDocParserStatus returns data.status (not top-level completed/status).
   The markdown output URL is in data.outputFormatResult[].outputFileUrl,
   not in a separate GetDocParserResult call. Rewrote polling to check
   data.status === 'success', then download markdown from the OSS URL.

Also added image download: markdown contains ![alt](oss-url) references;
the client now downloads those images and rewrites paths to local filenames.

Smoke test verified: prime_sieve.pdf → 15s → markdown with image refs downloaded.

AliyunDocmindClient is now production-ready given an AccessKey.
2026-07-18 17:25:03 +08:00
ChickenPige0n fb66614e38 fix(admin-web): break /admin/login returnTo redirect loop in dev
vite dev only proxied /api and /auth, so /admin/login hit the SPA root
layout, re-ran loadSession, got 401, and redirected back to /admin/login
with an ever-nesting returnTo. Proxy /admin/login to the backend (which
owns it before the SPA fallback) and guard redirectToLogin against
re-entering /admin/login.

Replace the only emoji-as-icon (the back-arrow on project detail) with
the Icon component (new arrow-left glyph).

Add scripts/dev-bootstrap.ts for seeding a local Silo (stub probes) so
npm run dev can start on a fresh dev DB.
2026-07-15 18:19:47 +08:00
ChickenPige0n 3ae0cc3e60 feat: update .gitignore, remove unused API interfaces, and add local dev scripts for bootstrap and seeding connections 2026-07-14 19:13:29 +08:00