mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-14 02:03:18 +08:00
feat: add message source context enhancement
This commit is contained in:
parent
5928b33057
commit
0cb79f74e9
69 changed files with 6217 additions and 597 deletions
|
|
@ -4,6 +4,7 @@ import { WhatsappLogoGlyph } from '../../channel-logos.js';
|
|||
import { QrActionIcon } from '../../credential-binding.js';
|
||||
import { h } from '../../i18n.js';
|
||||
import { WorkspaceEditor } from '../../workspace-editor.js';
|
||||
import { ContextEnhancementEditor } from '../../context-enhancement.js';
|
||||
import {
|
||||
AgentPresetCatalogContext,
|
||||
AgentPresetEditor,
|
||||
|
|
@ -297,6 +298,7 @@ export function WhatsappAccountCard({
|
|||
onReconnect,
|
||||
onWorkspaceSave,
|
||||
onAgentPresetSave,
|
||||
onContextEnhancementSave,
|
||||
onAccessPolicySave,
|
||||
onRequestRemove,
|
||||
onConfirmRemove,
|
||||
|
|
@ -334,6 +336,11 @@ export function WhatsappAccountCard({
|
|||
disabled: Boolean(busy),
|
||||
onSave: onAgentPresetSave,
|
||||
}),
|
||||
h(ContextEnhancementEditor, {
|
||||
config: account.contextEnhancement,
|
||||
disabled: Boolean(busy),
|
||||
onSave: onContextEnhancementSave,
|
||||
}),
|
||||
h(WhatsappAccessSettings, {
|
||||
account,
|
||||
busy: Boolean(busy),
|
||||
|
|
@ -596,6 +603,12 @@ export function WhatsappSettingsTab({ rpcCall }) {
|
|||
WHATSAPP_ENDPOINTS.setAgentPreset,
|
||||
{ botId: account.botId, agentPreset },
|
||||
),
|
||||
onContextEnhancementSave: (config) => botAction(
|
||||
account,
|
||||
'context-enhancement',
|
||||
WHATSAPP_ENDPOINTS.setContextEnhancement,
|
||||
{ botId: account.botId, config },
|
||||
),
|
||||
onAccessPolicySave: (accessPolicy) => botAction(
|
||||
account,
|
||||
'access',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue