From 38d3874d44e766a17358e4e852a463a67a54fbc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E7=A6=BB?= <165390418+molikai-work@users.noreply.github.com> Date: Sun, 6 Apr 2025 14:04:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BAai-chat=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=B8=B2=E6=9F=93a=E6=A0=87=E7=AD=BE=E6=97=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AE=89=E5=85=A8=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/ai-chat/index.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/src/components/ai-chat/index.vue b/web/src/components/ai-chat/index.vue index 695ad86..7ecc486 100644 --- a/web/src/components/ai-chat/index.vue +++ b/web/src/components/ai-chat/index.vue @@ -150,6 +150,13 @@ const md = new MarkdownIt({ } }) +md.renderer.rules.link_open = function (tokens, idx, options, env, self) { + const token = tokens[idx] + token.attrSet('target', '_blank') + token.attrSet('rel', 'noopener noreferrer') + return self.renderToken(tokens, idx, options) +} + const { proxy: { $message, $store } } = getCurrentInstance() const props = defineProps({