Conversation
|
同时修改了/develop/docker-compose.dev.yml中references和notifications端口冲突的问题 |
develop/docker-compose.dev.yml
Outdated
| - NODE_OPTIONS=--inspect=0.0.0.0:9229 | ||
| ports: | ||
| - "127.0.0.1:9230:9229" | ||
| - "0.0.0.0:9230:9229" |
develop/bin/dev
Outdated
| #!/usr/bin/env bash | ||
|
|
||
| docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --no-deps --detach "$@" | ||
| docker compose -f docker-compose.yml -f docker-compose.dev.yml up --no-deps --detach "$@" No newline at end of file |
There was a problem hiding this comment.
是不是可以把针对开发环境 (dev) 的修改新开一个 PR?(下面还有很多也是一样的)
develop/compiles/.gitkeep
Outdated
develop/docker-compose.dev.yml
Outdated
| - ../services/llm/app.js:/overleaf/services/llm/app.js | ||
| - ../services/llm/config:/overleaf/services/llm/config | ||
| - ../services/llm/controllers:/overleaf/services/llm/controllers | ||
| - ../services/llm/models:/overleaf/services/llm/models | ||
| - ../services/llm/routes:/overleaf/services/llm/routes | ||
| - ../services/llm/services:/overleaf/services/llm/services | ||
| - ../services/llm/utils:/overleaf/services/llm/utils | ||
| - ../services/llm/package.json:/overleaf/services/llm/package.json |
There was a problem hiding this comment.
文件目录结构是不是可以改得和其他模块一样?其他模块都是只需要挂载 app/, app.js, config/,这里分太多目录是不是没有必要
services/llm/.vscode/settings.json
Outdated
libraries/settings/index.js
Outdated
| @@ -1 +1 @@ | |||
| module.exports = require('./Settings') | |||
| module.exports = require('./Settings') No newline at end of file | |||
There was a problem hiding this comment.
可能是编辑器配置的问题?好多文件都是最后一行没有换行 (no newline at the end of file)?
services/llm/config/db.js
Outdated
| export default async function connectDatabase() { | ||
| try { | ||
| await mongoose.connect(dbConfig.uri, dbConfig.options); // 使用 mongoose.connect | ||
| console.log('MongoDB 连接成功'); |
There was a problem hiding this comment.
能不能尽量用英文啊?因为原来的 Overleaf 项目都是用英文的
services/llm/config/db.js
Outdated
| import mongoose from 'mongoose'; // 新增 | ||
| import {MONGO_URL} from './settings.defaults.js'; | ||
|
|
||
| // 数据库配置 |
There was a problem hiding this comment.
有很多类似的无用 comment,像是 LLM 给出来的。大家都知道 dbConfig 是“数据库配置”的意思。建议清理一下(最好是能用英文注释)
services/llm/config/db.js
Outdated
| @@ -0,0 +1,23 @@ | |||
| import mongoose from 'mongoose'; // 新增 | |||
| import {MONGO_URL} from './settings.defaults.js'; | |||
There was a problem hiding this comment.
你看其他 service 模块从来没有直接从 settings.defaults.js 里面导入的,都是用的
const Settings = require('@overleaf/settings')
这里面有一些特殊的逻辑在里面的
….dev.ymlip限制4.排除不必要文件5.解决newline at the end of file等
….dev.ymlip限制4.排除不必要文件5.解决newline at the end of file等
develop/docker-compose.dev.yml
Outdated
| - ../services/llm/app.js:/overleaf/services/llm/app.js | ||
| - ../services/llm/config:/overleaf/services/llm/config | ||
| - ../services/llm/app:/overleaf/app | ||
| - ../services/llm/package.json:/overleaf/services/llm/package.json |
There was a problem hiding this comment.
This is unnecessary because when this image is built as defined in /develop/docker-compose.yml , node_modules are already installed. No need to reimport package.json here. Also, follow the order of other services is recommended, that
- ../services/notifications/app:/overleaf/services/notifications/app
- ../services/notifications/app.js:/overleaf/services/notifications/app.js
- ../services/notifications/config:/overleaf/services/notifications/config
package.json
Outdated
| "services/tpdsworker", | ||
| "services/web" | ||
| "services/web", | ||
| "services/llm" |
There was a problem hiding this comment.
Consider sort dependencies in alphabetical order to comply with the conventions.
services/llm/Dockerfile
Outdated
| @@ -0,0 +1,22 @@ | |||
| FROM node:18.20.2 AS base | |||
There was a problem hiding this comment.
consider bump this version to latest lts as this service is recently written
services/llm/docker-compose.yml
Outdated
There was a problem hiding this comment.
In other services, docker-compose.yml serves as unit test. This doesn't seem useful if there is no unit test but only depenedencies
There was a problem hiding this comment.
Frontend should be i18n compatible, or at least in English since currently deployed instance is set to use English.
|
@HGChuang The service part should be OK. You should also add deployment files in ./server-ce/ Primarily:
|
| .paraphrase-card{pointer-events:auto;width:100%;background:#071223;border-radius:12px;padding:12px;box-shadow:0 14px 40px rgba(3,8,22,0.55);border:1px solid rgba(255,255,255,0.06);color:#e6eef8} | ||
| .paraphrase-text{width:100%;min-height:88px;padding:10px;border-radius:8px;background:rgba(255,255,255,0.02);color:#e6eef8;outline:none;resize:vertical;box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word} | ||
| .paraphrase-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:10px} | ||
| .btn{padding:8px 12px;border-radius:10px;cursor:pointer;border:1px solid rgba(255,255,255,0.06);background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01))} |


添加了overleaf copilot功能