fix(wip): WIP - partial unify WeChat/H5 skill prompts (build agent changes)
- Reuse H5's buildAutoChatSkillPrefix in buildWechatAgentPrompt signature - Inject autoSkillPrefix into voice/text message prompts - Add origin tagging in GET /sessions for h5/wechat channel labels Still TODO (will complete in next cycle): - Full resolveGrantedSkills → buildWechatAgentPrompt flow - ensureWechatAgentSession idle rotation logic - setSessionOrigin + touchWechatAgentRoute calls - Backend schema/migrations (h5_user_sessions origin column) - Frontend type + UI component updates Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1164,6 +1164,16 @@ export function createTkmindProxy({
|
||||
|
||||
const sessions = [...sessionsById.values()].sort(sortSessionsByRecent);
|
||||
await enrichSessionHistory(sessions);
|
||||
if (typeof userAuth.getSessionOrigins === 'function' && sessions.length > 0) {
|
||||
try {
|
||||
const origins = await userAuth.getSessionOrigins(sessions.map((s) => s.id));
|
||||
for (const session of sessions) {
|
||||
session.origin = origins.get(session.id) ?? 'h5';
|
||||
}
|
||||
} catch {
|
||||
// leave sessions untagged on lookup failure
|
||||
}
|
||||
}
|
||||
const summaries = sessions.map(projectSessionSummary).filter((item) => matchesSessionQuery(item, query));
|
||||
const paged = summaries.slice(offset, offset + limit);
|
||||
res.json({
|
||||
|
||||
Reference in New Issue
Block a user