@fcg-labs/cx-agent-hook 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +10 -4
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -140,10 +140,16 @@ export function createCxHook(config = {}) {
|
|
|
140
140
|
// 새 스트림 = 이전 채택 무효 (문의가 같아도 초안이 바뀐다)
|
|
141
141
|
adoptedAnswerId = null;
|
|
142
142
|
|
|
143
|
-
// 호칭 개인화 —
|
|
144
|
-
//
|
|
145
|
-
//
|
|
143
|
+
// 호칭 개인화 — 0.2.2: 이름을 context 로도 보낸다. 서버가 사설
|
|
144
|
+
// 서빙(AI_CS_LLM_PRIVATE)이면 인사말을 처음부터 이름으로 굽고,
|
|
145
|
+
// **저장은 하지 않는다**(로그에는 name_provided 마커만 — 서버 계약).
|
|
146
|
+
// 아래 클라 치환은 안전망으로 유지: 구 서버·클라우드 폴백처럼 이름
|
|
147
|
+
// 없이 "안녕하세요 고객님"으로 온 초안에만 작동하고, 서버가 이미
|
|
148
|
+
// 이름을 넣었으면 패턴이 안 맞아 no-op 이다.
|
|
146
149
|
const name = String(customerName || "").trim();
|
|
150
|
+
const contextWithName = name
|
|
151
|
+
? { ...(context || {}), customerName: name }
|
|
152
|
+
: context;
|
|
147
153
|
const personalize = (text) =>
|
|
148
154
|
name
|
|
149
155
|
? String(text).replace(
|
|
@@ -166,7 +172,7 @@ export function createCxHook(config = {}) {
|
|
|
166
172
|
|
|
167
173
|
status(messages.ui_requesting);
|
|
168
174
|
setDraft("");
|
|
169
|
-
const promise = client.getAnswerStream(inquiry,
|
|
175
|
+
const promise = client.getAnswerStream(inquiry, contextWithName, {
|
|
170
176
|
signal: controller.signal,
|
|
171
177
|
onDelta(text) { accumulated += text; queueDraft(); },
|
|
172
178
|
onRestart() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fcg-labs/cx-agent-hook",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "FCG CX Agent 후킹 SDK — 서빙 답변 수신 + CS팀 교정(점수·수정·발송) 후킹. 의존성 0, CMS에 install만으로 이식",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -100,4 +100,4 @@
|
|
|
100
100
|
"access": "public"
|
|
101
101
|
},
|
|
102
102
|
"//name": "스코프는 @fcg-labs — org 소유이고 @fcg-labs/tlm 과 같은 자리다. @fcg 는 우리 것이 아니다(발행 불가)."
|
|
103
|
-
}
|
|
103
|
+
}
|