@blueking/chat-helper 0.0.12-beta.16 → 0.0.12-beta.17
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/dist/index.d.ts
CHANGED
|
@@ -9616,7 +9616,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
|
|
|
9616
9616
|
labels: string[];
|
|
9617
9617
|
}>;
|
|
9618
9618
|
getSessionFeedbackReasons: (rate: number) => Promise<string[]>;
|
|
9619
|
-
renameSession: (sessionCode: string) => Promise<
|
|
9619
|
+
renameSession: (sessionCode: string) => Promise<import("./session").ISession<unknown, unknown>>;
|
|
9620
9620
|
uploadFile: (sessionCode: string, file: File) => Promise<{
|
|
9621
9621
|
download_url?: string;
|
|
9622
9622
|
}>;
|
|
@@ -7555,7 +7555,7 @@ export declare const useSession: (mediator: IMediatorModule) => {
|
|
|
7555
7555
|
labels: string[];
|
|
7556
7556
|
}>;
|
|
7557
7557
|
getSessionFeedbackReasons: (rate: number) => Promise<string[]>;
|
|
7558
|
-
renameSession: (sessionCode: string) => Promise<
|
|
7558
|
+
renameSession: (sessionCode: string) => Promise<ISession<unknown, unknown>>;
|
|
7559
7559
|
uploadFile: (sessionCode: string, file: File) => Promise<{
|
|
7560
7560
|
download_url?: string;
|
|
7561
7561
|
}>;
|
|
@@ -107,10 +107,10 @@ import { computed, ref } from 'vue';
|
|
|
107
107
|
var _current_value;
|
|
108
108
|
// 先更新 list 中对应的 session
|
|
109
109
|
list.value = list.value.map((item)=>item.sessionCode === session.sessionCode ? _object_spread({}, item, session) : item);
|
|
110
|
-
//
|
|
110
|
+
// 同步 current:优先指向 list 中更新后的对象;若不在 list(分页外 / getSession 单独写入),直接合并字段
|
|
111
111
|
if (((_current_value = current.value) === null || _current_value === void 0 ? void 0 : _current_value.sessionCode) === session.sessionCode) {
|
|
112
112
|
var _list_value_find;
|
|
113
|
-
current.value = (_list_value_find = list.value.find((item)=>item.sessionCode === session.sessionCode)) !== null && _list_value_find !== void 0 ? _list_value_find : current.value;
|
|
113
|
+
current.value = (_list_value_find = list.value.find((item)=>item.sessionCode === session.sessionCode)) !== null && _list_value_find !== void 0 ? _list_value_find : _object_spread({}, current.value, session);
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
/**
|
|
@@ -312,7 +312,7 @@ import { computed, ref } from 'vue';
|
|
|
312
312
|
var _mediator_http;
|
|
313
313
|
return (_mediator_http = mediator.http) === null || _mediator_http === void 0 ? void 0 : _mediator_http.session.getSessionFeedbackReasons(rate);
|
|
314
314
|
};
|
|
315
|
-
//
|
|
315
|
+
// 会话重命名(返回接口最新 session,供上层事件直接使用新名称)
|
|
316
316
|
const renameSession = (sessionCode)=>{
|
|
317
317
|
var _mediator_http;
|
|
318
318
|
isRenameLoading.value = true;
|
|
@@ -321,6 +321,7 @@ import { computed, ref } from 'vue';
|
|
|
321
321
|
sessionCode: res.sessionCode,
|
|
322
322
|
sessionName: res.sessionName
|
|
323
323
|
});
|
|
324
|
+
return res;
|
|
324
325
|
}).finally(()=>{
|
|
325
326
|
isRenameLoading.value = false;
|
|
326
327
|
});
|