UNPKG

ant-design-x-vue-next

Version:

Ant Design X for Vue — community continuation aligned with @ant-design/x

34 lines (33 loc) 832 B
import { AbstractChatProvider as n } from "./AbstractChatProvider.mjs"; class c extends n { constructor(r = {}) { super(r); } transformParams(r, a, t) { var e, s; if (r !== null && typeof r != "object") throw new Error("requestParams must be an object"); return { ...(t == null ? void 0 : t.params) || ((s = (e = this.request) == null ? void 0 : e.options) == null ? void 0 : s.params) || {}, ...this.config.params || {}, ...r || {} }; } transformLocalMessage(r) { return r; } transformMessage(r) { const { chunk: a, chunks: t, originMessage: e } = r; if (a) return a; if (Array.isArray(t)) { const s = t.length > 0 ? t[t.length - 1] : void 0; return e || s; } return t; } } export { c as DefaultChatProvider, c as default };