Giter Club home page Giter Club logo

gomoon's Issues

Prompt 模板最好能支持变量

比如百度的prompt如下:
现在你是一位精通{code}的资深IT研发工程师,你需要解答{problem}这个问题。注意你需要介绍问题所涉及的计算机原理并给出示例帮助我更清晰的理解这个问题。
模板ID:
pt-d1bfe25ca48d0511
场景类型:文生文
参数格式:大括号{}

bug和建议

v1.0.6bug:目前版本无法发送文件让ai进行解析
建议:建议可以在发送文件的同时输入文字说明,还有加一个文件拖拽窗口并弹窗是否要编写文字说明并发送此文件?或者是拖拽后直接放在输入框里,然后编辑文字发送

提个建议

请问是否可以在手动复制内容时让对话界面跟着鼠标滚动呢?
目前的情况是复制时如果还想复制下面的内容的话就会直接给我全部选中了

默认安装位置

目前好像是默认安装C盘,可以在安装时修改安装位置吗?

[Bugs] ArchLinux下编译的一些问题

首先非常感谢开发了这个软件包!
从微信公众号上看到了这个项目,然后我搜索了一下ArchLinux的AUR,发现没有人移植,同时在官网也没有找到Linux版本的下载地址,于是我就准备自己编译一下,结果遇到了一堆问题,现将问题反馈如下:
1、 src/main/index.tsimport icon from '../../resources/icon.png?asset'src/min/windows.tsimport trayIcon from '../../resources/[email protected]?asset' 都指向了不存在的resources 目录,这个我通过如下命令解决了:

icotool -i 3 -x icons/icon.ico -o icons/icon.png
icotool -i 9 -x icons/icon.ico -o icons/[email protected]
cp -r icons resources

2、.npmrc建议修改为以下内容,这样在国内可以正常编译:

registry="https://registry.npmmirror.com/"
electron_mirror="https://registry.npmmirror.com/-/binary/electron/"
electron_builder_binaries_mirror="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"

3、Linux下缺少很多node_modules,建议添加:

pnpm add node-fetch apache-arrow tslib flatbuffers "@neon-rs/load" "@lancedb/vectordb-linux-x64-gnu" axios form-data \
        proxy-from-env follow-redirects builder-util-runtime debug ms sax fs-extra universalify graceful-fs jsonfile \
        lazy-val semver lru-cache combined-stream delayed-stream js-yaml mime-types mime-db asynckit

都是我编译完成后运行软件,在终端报错缺少XXX模块,然后我逐一添加的。
4、建议将package.json"electron": "28.0.0", 改为 "electron": "^28.0.0", ,以使用最新版的Electron28,大版本中的小版本应该是可以向下兼容的,至少我目前移植的所有使用Electron开发的包都是这样的。
5、最终编译成功,但是运行时依然报错:

$ ../gomoon 
A JavaScript error occurred in the main process
Uncaught Exception:
TypeError: LRU is not a constructor
    at Object.<anonymous> (/home/zxp-endeavouros/.cache/paru/clone/gomoon-git/src/gomoon.git/dist/linux-unpacked/resources/app.asar/node_modules/semver/classes/range.js:202:15)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1326:10)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at Module._load (node:internal/modules/cjs/loader:967:12)
    at l._load (node:electron/js2c/asar_bundle:2:13642)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/home/zxp-endeavouros/.cache/paru/clone/gomoon-git/src/gomoon.git/dist/linux-unpacked/resources/app.asar/node_modules/semver/classes/comparator.js:141:15)
    at Module._compile (node:internal/modules/cjs/loader:1271:14)

我本人不是程序员,也不知道该如何解决~
附上AUR代码(剥离了编译后的Electron28,直接使用系统自带的,减小软件体积):
PKGBUILD

# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=gomoon-git
_pkgname=Gomoon
pkgver=1.0.5.r124.gcc53874
_electronversion=28
_nodeversion=18
pkgrel=1
pkgdesc="An ai tools for everyone.一款桌面端的大模型效率工具."
arch=('x86_64')
url="https://gomoon.top/"
_ghurl="https://github.com/wizardAEI/Gomoon"
license=('Apache-2.0')
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}=${pkgver%.r*}")
depends=(
    "electron${_electronversion}"
)
makedepends=(
    'gendesk'
    'nvm'
    'npm'
    'pnpm'
    'git'
    'icoutils'
    'curl'
)
source=(
    "${pkgname//-/.}::git+${_ghurl}.git"
    "${pkgname%-git}.sh"
)
sha256sums=('SKIP'
            'dc0c5ca385ad81a08315a91655c7c064b5bf110eada55e61265633ae198b39f8')
pkgver() {
    cd "${srcdir}/${pkgname//-/.}"
    git describe --long --tags --exclude='*[a-z][a-z]*' | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}
_ensure_local_nvm() {
    export NVM_DIR="${srcdir}/.nvm"
    source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
    nvm install "${_nodeversion}"
    nvm use "${_nodeversion}"
}
build() {
    sed -e "s|@electronversion@|${_electronversion}|" \
        -e "s|@appname@|${pkgname%-git}|g" \
        -e "s|@runname@|app.asar|g" \
        -e "s|@options@||g" \
        -i "${srcdir}/${pkgname%-git}.sh"
    _ensure_local_nvm
    gendesk -f -n -q --categories="Development" --name="${_pkgname}" --exec="${pkgname%-git} %U"
    cd "${srcdir}/${pkgname//-/.}"
    export npm_config_build_from_source=true
    export ELECTRON_SKIP_BINARY_DOWNLOAD=1
    export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
    export npm_config_target="${SYSTEM_ELECTRON_VERSION}"
    export ELECTRONVERSION="${_electronversion}"
    export npm_config_disturl=https://electronjs.org/headers
    HOME="${srcdir}/.electron-gyp"
    pnpm config set store-dir "${srcdir}/.pnpm_store"
    pnpm config set cache-dir "${srcdir}/.pnpm_cache"
    pnpm config set link-workspace-packages true
    if [ `curl -s ipinfo.io/country | grep CN | wc -l ` -ge 1 ];then
        echo > .npmrc
        echo 'registry="https://registry.npmmirror.com/"' >> .npmrc
        echo 'electron_mirror="https://registry.npmmirror.com/-/binary/electron/"' >> .npmrc
        echo 'electron_builder_binaries_mirror="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"' >> .npmrc
    else
        echo "Your network is OK."
    fi
    sed "s|--linux|--dir|g" -i package.json
    icotool -i 3 -x icons/icon.ico -o icons/icon.png
    icotool -i 9 -x icons/icon.ico -o icons/[email protected]
    cp -r icons resources
    pnpm install
    pnpm add node-fetch apache-arrow tslib flatbuffers "@neon-rs/load" "@lancedb/vectordb-linux-x64-gnu" axios form-data \
        proxy-from-env follow-redirects builder-util-runtime debug ms sax fs-extra universalify graceful-fs jsonfile \
        lazy-val semver lru-cache combined-stream delayed-stream js-yaml mime-types mime-db asynckit
    pnpm run build:linux
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
    install -Dm644 "${srcdir}/${pkgname//-/.}/dist/linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname%-git}"
    install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
    install -Dm644 "${srcdir}/${pkgname//-/.}/icons/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
}

gomoon.sh

#!/bin/bash
set -e
_APPDIR="/usr/lib/@appname@"
_RUNNAME="${_APPDIR}/@runname@"
_OPTIONS="@options@"
export PATH="${_APPDIR}:${PATH}"
export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
export ELECTRON_IS_DEV=0
export ELECTRON_FORCE_IS_PACKAGED=true
export NODE_ENV=production
cd "${_APPDIR}"
if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
    exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" "$@" || exit $?
else
    exec electron@electronversion@ "${_RUNNAME}" "${_OPTIONS}" --no-sandbox "$@" || exit $?
fi

一些功能建议!!!!!

  1. 希望可以加入 gemini 模型(因为免费),并且带自定义地址(可以通过反代突破地域限制)
  2. Mac 端希望可以把应用窗口添加到屏幕上方状态栏,使用更加快捷方便
    示例:
CleanShot.2024-03-10.at.12.53.55.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.