Add smart ACK provider for WeChat MP replies

Replace fixed ackText with a rule-based AckProvider that picks
response templates by message type and intent (translate, summary,
rewrite, poster, ppt, mindmap, code, search, schedule). Pure sync,
zero I/O, auto-falls back to config.ackText on any error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
john
2026-06-26 15:19:03 +08:00
parent 9ed4fd48d7
commit 9b4a25799f
162 changed files with 17276 additions and 2054 deletions
+6 -2
View File
@@ -56,11 +56,15 @@ export function isImageAsset(asset: MindSpaceAsset) {
return asset.assetType === 'image' || asset.mimeType.startsWith('image/');
}
export function buildAssetImageUrl(asset: Pick<MindSpaceAsset, 'id' | 'updatedAt'>) {
export function buildAssetImageUrl(asset: Pick<MindSpaceAsset, 'id' | 'updatedAt' | 'publicUrl'>) {
if (asset.publicUrl) return asset.publicUrl;
return `/api/mindspace/v1/assets/${asset.id}/download?inline=1&v=${asset.updatedAt}`;
}
export function buildAbsoluteAssetImageUrl(asset: Pick<MindSpaceAsset, 'id' | 'updatedAt'>): string {
export function buildAbsoluteAssetImageUrl(
asset: Pick<MindSpaceAsset, 'id' | 'updatedAt' | 'publicUrl'>,
): string {
if (asset.publicUrl) return new URL(asset.publicUrl, window.location.origin).toString();
return `${window.location.origin}${buildAssetImageUrl(asset)}`;
}