From 003b99f6b2ebdff8f9eb9acd5ece8d77adba8101 Mon Sep 17 00:00:00 2001 From: weixin_44463441 Date: Mon, 21 Aug 2023 17:22:00 +0800 Subject: [PATCH] Mon Aug 21 17:22:00 CST 2023 inscode --- package.json | 1 + src/js/config.js | 10 ++++++++-- src/rep.txt | 2 -- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b23077a..56e9db7 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "dependencies": { "@microsoft/fetch-event-source": "^2.0.1", "axios": "^1.4.0", + "fs": "^0.0.1-security", "guess": "^1.0.2", "markdown-it-vue": "^1.1.7", "npm": "^9.7.2", diff --git a/src/js/config.js b/src/js/config.js index 3de2534..f010245 100644 --- a/src/js/config.js +++ b/src/js/config.js @@ -1,5 +1,11 @@ -import template from '../rep.txt' -console.info(template) +const fs = require('fs'); +const path = require('path'); + +const configFilePath = path.join(__dirname, '../rep.txt'); +const configData = fs.readFileSync(configFilePath, 'utf8'); +const template = configData.trim() + + export default { getData () { debugger diff --git a/src/rep.txt b/src/rep.txt index ea69ad0..4c87a18 100644 --- a/src/rep.txt +++ b/src/rep.txt @@ -1,4 +1,3 @@ -export default ``` 你现在扮演产品InsCode的负责人。需要结合以下信息中回答用户问题。 产品介绍: InsCode 是一个一站式的软件开发服务平台,从开发-部署-运维-运营,都可以在 InsCode 轻松完成。 @@ -39,4 +38,3 @@ InsCode 主要适用于以下场景 {context} 请根据产品介绍、问题相关信息,回答用户问题。 -``` \ No newline at end of file -- GitLab