Route WeChat publish URLs through facade
This commit is contained in:
+2
-2
@@ -8,7 +8,7 @@ import { reconcileAgentSession } from './session-reconcile.mjs';
|
|||||||
import { isScheduleIntent, parseScheduleIntent, shouldUseScheduleAssistant } from './schedule-intent.mjs';
|
import { isScheduleIntent, parseScheduleIntent, shouldUseScheduleAssistant } from './schedule-intent.mjs';
|
||||||
import { materializeMissingPublicHtmlWrites } from './mindspace-public-finish-sync.mjs';
|
import { materializeMissingPublicHtmlWrites } from './mindspace-public-finish-sync.mjs';
|
||||||
import { buildCurrentTimeAgentPrefix } from './user-memory-profile.mjs';
|
import { buildCurrentTimeAgentPrefix } from './user-memory-profile.mjs';
|
||||||
import { PUBLISH_ROOT_DIR } from './user-publish.mjs';
|
import { buildPublicUrl, PUBLISH_ROOT_DIR } from './user-publish.mjs';
|
||||||
import { buildAutoChatSkillPrefix } from './chat-skills.mjs';
|
import { buildAutoChatSkillPrefix } from './chat-skills.mjs';
|
||||||
import { downloadTemporaryMedia, persistWechatImage } from './wechat-media.mjs';
|
import { downloadTemporaryMedia, persistWechatImage } from './wechat-media.mjs';
|
||||||
import { buildAckText } from './wechat/ack/ack-provider.mjs';
|
import { buildAckText } from './wechat/ack/ack-provider.mjs';
|
||||||
@@ -431,7 +431,7 @@ function isMissingRequiredPublishSkill(reply, intent) {
|
|||||||
function buildPublicHtmlUrl(workingDir, relativePath, publicBaseUrl) {
|
function buildPublicHtmlUrl(workingDir, relativePath, publicBaseUrl) {
|
||||||
const owner = path.basename(path.resolve(workingDir));
|
const owner = path.basename(path.resolve(workingDir));
|
||||||
const normalized = relativePath.split(path.sep).map(encodeURIComponent).join('/');
|
const normalized = relativePath.split(path.sep).map(encodeURIComponent).join('/');
|
||||||
return `${String(publicBaseUrl ?? '').replace(/\/+$/, '')}/${PUBLISH_ROOT_DIR}/${encodeURIComponent(owner)}/${normalized}`;
|
return buildPublicUrl(publicBaseUrl, owner, normalized);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ensurePublicHtmlArtifact(htmlPath, workingDir) {
|
function ensurePublicHtmlArtifact(htmlPath, workingDir) {
|
||||||
|
|||||||
Reference in New Issue
Block a user