diff --git a/.This project migrated to AtomGit/README.md b/.This project migrated to AtomGit/README.md new file mode 100644 index 0000000000000000000000000000000000000000..15245fed58cac10ec04da9efe88b912420d8a6b8 --- /dev/null +++ b/.This project migrated to AtomGit/README.md @@ -0,0 +1 @@ +# Notice: This project has been migrated to [AtomGit](https://atomgit.com/src-openeuler/polymind) diff --git "a/.\346\234\254\351\241\271\347\233\256\345\267\262\350\277\201\347\247\273\350\207\263AtomGit/README.md" "b/.\346\234\254\351\241\271\347\233\256\345\267\262\350\277\201\347\247\273\350\207\263AtomGit/README.md" new file mode 100644 index 0000000000000000000000000000000000000000..29faa9d6942179fa7c3934024a6e0d3170ec5219 --- /dev/null +++ "b/.\346\234\254\351\241\271\347\233\256\345\267\262\350\277\201\347\247\273\350\207\263AtomGit/README.md" @@ -0,0 +1 @@ +# 通知: 本项目已迁移至 [AtomGit](https://atomgit.com/src-openeuler/polymind) diff --git a/README.md b/README.md index 21ea7d08d39c064d9bbbc69c287eca2ede09d99e..7c63f2f2689c4f1cff24002a274c2b01c1a1ecd4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# Notice: This project has been migrated to [AtomGit](https://atomgit.com/src-openeuler/polymind) +# 通知: 本项目已迁移至 [AtomGit](https://atomgit.com/src-openeuler/polymind) # polymind #### 介绍 diff --git a/docs/en/_toc.yaml b/docs/en/_toc.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e021ca9b1b6fe95510bd2b3a24aa6d317786ec10 --- /dev/null +++ b/docs/en/_toc.yaml @@ -0,0 +1,6 @@ +label: PolyMind User Guide +isManual: true +description: PolyMind is a feature-rich AI assistant that supports mainstream language models, providing environment awareness and powerful tool scheduling capabilities for the DevStation distribution. +sections: + - label: PolyMind Quick Start + href: ./quick_start.md \ No newline at end of file diff --git a/docs/en/figures/01_install.png b/docs/en/figures/01_install.png new file mode 100644 index 0000000000000000000000000000000000000000..58714ca2673efc7edc2973da2a0f63ac45e2ecab Binary files /dev/null and b/docs/en/figures/01_install.png differ diff --git a/docs/en/figures/02_config_llm.png b/docs/en/figures/02_config_llm.png new file mode 100644 index 0000000000000000000000000000000000000000..76cd61fc3b42d226239dddf2c1cf4f08ef335751 Binary files /dev/null and b/docs/en/figures/02_config_llm.png differ diff --git a/docs/en/figures/03_config_model.png b/docs/en/figures/03_config_model.png new file mode 100644 index 0000000000000000000000000000000000000000..5d852506ef8a3eb72b3c52789e7b85d96e390c79 Binary files /dev/null and b/docs/en/figures/03_config_model.png differ diff --git a/docs/en/figures/04_index.png b/docs/en/figures/04_index.png new file mode 100644 index 0000000000000000000000000000000000000000..407696cf7997eca558021f32c52eded584f74907 Binary files /dev/null and b/docs/en/figures/04_index.png differ diff --git a/docs/en/quick_start.md b/docs/en/quick_start.md new file mode 100644 index 0000000000000000000000000000000000000000..aac6de624ae882e8b1aa7d7fce36b033be0742fd --- /dev/null +++ b/docs/en/quick_start.md @@ -0,0 +1,155 @@ +# PolyMind Quick Start Guide + +PolyMind is a feature-rich AI assistant that supports mainstream language models, providing environment awareness and powerful tool scheduling capabilities for the DevStation distribution. + +## Quick Start + +### 1. Download and Installation + +PolyMind was first released in openEuler-24.03-LTS-SP3 version and is pre-integrated in the DevStation platform. + +Install the package: + +```bash +sudo dnf install -y polymind +``` + +After successful installation, click the icon from the menu bar and launch the application. +

+ +

+ +### 2. Configure Model + +**After first launch, you need to configure the model provider:** + +1. Select model service provider +2. Automatically add the API address corresponding to the model service provider +3. Add your API key (such as OpenAI, DeepSeek, etc.) or configure local Ollama. +4. Next + +

+ +

+**After configuring the model provider, further configure the model:** + +1. Select model +2. Verify model (optional) +3. Next + +

+ +

+**After configuration is complete, click Start Using.** + +### 3. Start Conversation + +1. Agent Configuration: Support creating, customizing and importing agents +2. Start Conversation: + - Select agent + - Enter message + - Press Enter to send +3. Settings: Support custom agent parameters, MCP services, search enhancement, etc. +4. Configuration Bar: Provide model parameters, MCP services, search enhancement and other configurations + +

+ +

+ +## Core Features + +### Agent Support +- **Local Agents**: Support creating and customizing agents. +- **A2A Support**: Support Agent-to-Agent communication for multi-agent collaboration. + +### Multi-Model Support +- **Cloud Models**: DeepSeek, OpenAI, Gemini, Anthropic, Silicon Flow, Tencent Hunyuan, etc. +- **Local Models**: Built-in Ollama integration, manage local models without command line. + +### Tool Calling +- Built-in Model Context Protocol (MCP) support, providing tools for code execution, web retrieval, file operations, etc. +- Models can automatically call built-in tools during conversations for environment awareness and scheduling. + +### Search Enhancement +- Support for Brave Search, Google, Bing, Baidu and other search engines. +- Models can intelligently decide when to search and highlight search results. + +### Advanced Rendering +- Complete Markdown rendering with code block syntax highlighting. +- Support for Mermaid diagrams, images, Artifacts and other multimedia content. + +## Developer Guide + +### Environment Preparation + +Ensure the following are installed: +- Node.js >= 20.19.0 +- pnpm >= 10.11.0 + +### Install Dependencies + +```bash +pnpm install +pnpm run installRuntime +``` + +**Windows Users**: If you encounter symbolic link errors, enable "Developer Mode" or run with administrator privileges. + +### Start Development Server + +```bash +pnpm run dev +``` + +### Build Application + +Execute the corresponding command for your target platform: + +```bash +# Windows +pnpm run build:win + +# macOS +pnpm run build:mac + +# Linux +pnpm run build:linux +``` + +For more architecture options, refer to the scripts in `package.json`. + +### Project Structure + +``` +src/ +├── main/ # Electron main process +├── renderer/ # Vue frontend +├── preload/ # Preload scripts +└── shared/ # Shared types and tools +docs/ # Design documentation +scripts/ # Build scripts +resources/ # Static resources +``` + +## Frequently Asked Questions + +### 1. White Screen on Startup +Check the developer tools (Ctrl+Shift+I) for errors. It may be due to incomplete dependency installation. Try re-running `pnpm install`. + +### 2. Ollama Connection Failure +Ensure the Ollama service is running (default address `http://localhost:11434`). You can modify the Ollama endpoint in settings. + +### 3. API Key Configuration +Add the corresponding provider in "Model Providers", enter the API key and save. Keys are stored in local encrypted configuration. + +### 4. Tool Calling Not Working +Check if MCP services are enabled. View the "MCP Services" tab in settings to ensure required services are enabled. + +## More Resources + +- [AtomGit Repository](https://atomgit.com/openeuler/polymind) +- [Issue Reporting](https://atomgit.com/openeuler/polymind/issues) + +## License + +Apache License 2.0 © openEuler Community \ No newline at end of file diff --git a/docs/zh/_toc.yaml b/docs/zh/_toc.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1100254599ebec672867cc414474086c8d0401a8 --- /dev/null +++ b/docs/zh/_toc.yaml @@ -0,0 +1,6 @@ +label: PolyMind 用户指南 +isManual: true +description: PolyMind 是一个功能丰富的 AI 助手,支持主流语言模型,为 DevStation 发行版提供环境感知和强大的工具调度能力。 +sections: + - label: PolyMind 快速开始 + href: ./quick_start.md diff --git a/docs/zh/figures/01_install.png b/docs/zh/figures/01_install.png new file mode 100644 index 0000000000000000000000000000000000000000..58714ca2673efc7edc2973da2a0f63ac45e2ecab Binary files /dev/null and b/docs/zh/figures/01_install.png differ diff --git a/docs/zh/figures/02_config_llm.png b/docs/zh/figures/02_config_llm.png new file mode 100644 index 0000000000000000000000000000000000000000..76cd61fc3b42d226239dddf2c1cf4f08ef335751 Binary files /dev/null and b/docs/zh/figures/02_config_llm.png differ diff --git a/docs/zh/figures/03_config_model.png b/docs/zh/figures/03_config_model.png new file mode 100644 index 0000000000000000000000000000000000000000..18c8d9f0dc4925288ae946c3867696d69cd2fede Binary files /dev/null and b/docs/zh/figures/03_config_model.png differ diff --git a/docs/zh/figures/04_index.png b/docs/zh/figures/04_index.png new file mode 100644 index 0000000000000000000000000000000000000000..e1a74519dbe335f8e7499870c8d245570c8701bc Binary files /dev/null and b/docs/zh/figures/04_index.png differ diff --git a/docs/zh/quick_start.md b/docs/zh/quick_start.md new file mode 100644 index 0000000000000000000000000000000000000000..c0175b41875f3eb17c3d53bab595c559714a1290 --- /dev/null +++ b/docs/zh/quick_start.md @@ -0,0 +1,155 @@ +# PolyMind 快速使用指南 + +PolyMind 是一个功能丰富的 AI 助手,支持主流语言模型,为 DevStation 发行版提供环境感知和强大的工具调度能力。 + +## 快速开始 + +### 1. 下载与安装 + +PolyMind 最早发布于 openEuler-24.03-LTS-SP3 版本,并在 DevStation 平台中预集成。 + +安装软件包: + +```bash +sudo dnf install -y polymind +``` + +安装成功后,从菜单栏点击图标并启动应用程序。 +

+ +

+ +### 2. 配置模型 + +**首次启动后,需要配置模型提供商:** + +1. 选择模型服务商 +2. 自动添加模型服务商对应的API地址 +3. 添加你的 API 密钥(如 OpenAI、DeepSeek 等)或配置本地 Ollama。 +4. 下一步 + +

+ +

+**配置模型供应商后,进一步配置模型:** + +1. 选择模型 +2. 验证模型(可选) +3. 下一步 + +

+ +

+**配置完成后,点击开始使用。** + +### 3. 开始对话 + +1. 智能体配置: 支持创建、自定义和导入智能体 +2. 开始对话: + - 选择智能体 + - 输入消息 + - 按 Enter 发送 +3. 设置: 支持自定义智能体参数、MCP 服务、搜索增强等 +4. 配置栏: 提供模型参数、MCP 服务、搜索增强等配置 + +

+ +

+ +## 核心功能 + +### Agent支持 +- **本地智能体**:支持创建和自定义智能体。 +- **A2A支持**:支持 Agent-to-Agent 通信,实现多智能体协作。 + +### 多模型支持 +- **云模型**:DeepSeek、OpenAI、Gemini、Anthropic、硅基流动、腾讯混元等。 +- **本地模型**:内置 Ollama 集成,无需命令行即可管理本地模型。 + +### 工具调用 +- 内置 Model Context Protocol (MCP) 支持,提供代码执行、网页检索、文件操作等工具。 +- 可在对话中让模型自动调用内置工具,进行环境感知和调度。 + +### 搜索增强 +- 支持 Brave Search、Google、Bing、百度等搜索引擎。 +- 模型可智能决定何时进行搜索,并将搜索结果高亮显示。 + +### 高级渲染 +- 完整的 Markdown 渲染,代码块语法高亮。 +- 支持 Mermaid 图表、图片、Artifacts 等多媒体内容。 + +## 开发者指南 + +### 环境准备 + +确保已安装: +- Node.js >= 20.19.0 +- pnpm >= 10.11.0 + +### 安装依赖 + +```bash +pnpm install +pnpm run installRuntime +``` + +**Windows 用户**:若遇到符号链接错误,请启用“开发者模式”或使用管理员权限运行。 + +### 启动开发服务器 + +```bash +pnpm run dev +``` + +### 构建应用 + +按目标平台执行对应命令: + +```bash +# Windows +pnpm run build:win + +# macOS +pnpm run build:mac + +# Linux +pnpm run build:linux +``` + +更多架构选项请参考 `package.json` 中的 scripts。 + +### 项目结构 + +``` +src/ +├── main/ # Electron 主进程 +├── renderer/ # Vue 前端 +├── preload/ # 预加载脚本 +└── shared/ # 共享类型与工具 +docs/ # 设计文档 +scripts/ # 构建脚本 +resources/ # 静态资源 +``` + +## 常见问题 + +### 1. 启动时白屏 +检查开发工具(Ctrl+Shift+I)是否有错误,可能是依赖未安装完整,尝试重新执行 `pnpm install`。 + +### 2. Ollama 连接失败 +确保 Ollama 服务已启动(默认地址 `http://localhost:11434`)。可在设置中修改 Ollama 端点。 + +### 3. API 密钥配置 +在“模型提供商”中添加对应提供商,输入 API 密钥并保存。密钥存储在本地加密配置中。 + +### 4. 工具调用不工作 +检查 MCP 服务是否已启用。在设置中查看“MCP 服务”标签页,确保所需服务已开启。 + +## 更多资源 + +- [AtomGit 仓库](https://atomgit.com/openeuler/polymind) +- [问题反馈](https://atomgit.com/openeuler/polymind/issues) + +## 许可证 + +Apache License 2.0 © openEuler 社区 \ No newline at end of file diff --git a/node-v37.10.0-headers.tar.gz b/node-v37.10.0-headers.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..158ab19f61164ccfae31dc5ba3b2ab8bf1082e9e Binary files /dev/null and b/node-v37.10.0-headers.tar.gz differ diff --git a/polymind-1.0.0.tar.gz b/polymind-1.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..cfe5121147e801f52e800d7efdc3a3cde7e4c161 Binary files /dev/null and b/polymind-1.0.0.tar.gz differ diff --git a/polymind.spec b/polymind.spec new file mode 100644 index 0000000000000000000000000000000000000000..34d8dc72355c66253b99f9f8729237df5f7b4e21 --- /dev/null +++ b/polymind.spec @@ -0,0 +1,227 @@ +%global debug_package %{nil} + +Name: polymind +Version: 1.0.0 +Release: 3 +Summary: PolyMind - A simple and easy-to-use AI client + +Group: Applications/Productivity +License: Apache-2.0 +URL: https://gitee.com/openeuler/polymind +Source0: %{name}-%{version}.tar.gz + +# Build dependencies +BuildRequires: nodejs >= 20.19.0 + +# Exclude Electron app directory from automatic dependency analysis +%global __provides_exclude_from ^/opt/polymind/app/.*$ +%global __requires_exclude_from ^/opt/polymind/app/.*$ +# Exclude specific Electron app shared library dependencies + +%description +PolyMind is a feature-rich AI assistant that supports mainstream language models, +providing environment awareness and powerful tool scheduling capabilities. + +As a cross-platform AI assistant application, it not only supports basic chat +functionality but also provides advanced features such as search enhancement, +tool calling, multimodal interaction, making AI capabilities more convenient and efficient. + +# Runtime dependencies +Requires: google-noto-emoji-fonts + +%prep +%setup -q -n %{name}-%{version} +# Extract node headers for native modules +mkdir -p /tmp/node-headers +tar -xzf %{_sourcedir}/node-*-headers.tar.gz -C /tmp/node-headers --strip-components=1 + +%build + +# Get current architecture +case "%{_arch}" in + x86_64) + TARGET_ARCH="x64" + ;; + aarch64|arm64) + TARGET_ARCH="arm64" + ;; + *) + echo "Unsupported architecture: %{_arch}" + exit 1 + ;; +esac + +echo "Target architecture: $TARGET_ARCH" + +npm config set prefix '~/.npm-global' +npm config set registry https://mirrors.huaweicloud.com/repository/npm/ +npm install -g pnpm +export PATH=~/.npm-global/bin:$PATH + +# Install dependencies +pnpm install + +# Build application +pnpm run build +pnpm run copy:binaries + +# Set environment variables to ensure correct architecture build +export TARGET_ARCH=$TARGET_ARCH + +# Select correct build command based on architecture, only build unpacked directory +if [ "$TARGET_ARCH" = "arm64" ]; then + npx electron-builder --linux dir --arm64 +else + npx electron-builder --linux dir --x64 +fi + +# Check build results +if [ "$TARGET_ARCH" = "arm64" ]; then + EXPECTED_DIR="dist/linux-arm64-unpacked" +else + EXPECTED_DIR="dist/linux-unpacked" +fi + +if [ ! -d "$EXPECTED_DIR" ]; then + echo "Build failed, $EXPECTED_DIR directory not found" + ls -la dist/ || true + exit 1 +fi + +echo "Build completed" + +%install +# Create installation directory structure +mkdir -p %{buildroot}/opt/polymind/app +mkdir -p %{buildroot}/usr/bin +mkdir -p %{buildroot}/usr/share/applications +mkdir -p %{buildroot}/usr/share/icons/hicolor/512x512/apps +mkdir -p %{buildroot}/usr/share/doc/%{name} + +# Get current architecture to determine build result directory +case "%{_arch}" in + x86_64) + BUILD_DIR="dist/linux-unpacked" + ;; + aarch64|arm64) + BUILD_DIR="dist/linux-arm64-unpacked" + ;; + *) + echo "Unsupported architecture: %{_arch}" + exit 1 + ;; +esac + +# Install application files +cp -rf $BUILD_DIR/* %{buildroot}/opt/polymind/app/ + +# Create startup script +cat > %{buildroot}/usr/bin/polymind << 'EOF' +#!/bin/bash +exec /opt/polymind/app/polymind "$@" +EOF + +# Install desktop file +cat > %{buildroot}/usr/share/applications/%{name}.desktop << 'EOF' +[Desktop Entry] +Name=PolyMind +Comment=AI Client Application +Exec=polymind +Icon=polymind +Terminal=false +Type=Application +Categories=Utility; +StartupWMClass=PolyMind +MimeType=x-scheme-handler/polymind; +EOF + +# Install icon file +if [ -f "resources/icon.png" ]; then + cp resources/icon.png %{buildroot}/usr/share/icons/hicolor/512x512/apps/%{name}.png +else + # If icon not found, create a placeholder + echo "Warning: Icon file not found, creating placeholder" + touch %{buildroot}/usr/share/icons/hicolor/512x512/apps/%{name}.png +fi + +# Install documentation files +cp README.md %{buildroot}/usr/share/doc/%{name}/ + +# Set file permissions +chmod 755 %{buildroot}/opt/polymind/app/polymind +chmod 755 %{buildroot}/usr/bin/polymind +chmod 644 %{buildroot}/usr/share/applications/%{name}.desktop +chmod 644 %{buildroot}/usr/share/icons/hicolor/512x512/apps/%{name}.png + +%files +%defattr(-,root,root,-) +%license LICENSE +%doc README.md + +# Application files - based on actual build output +%attr(755,root,root) /opt/polymind/app/polymind +%attr(755,root,root) /opt/polymind/app/chrome-sandbox +%attr(755,root,root) /opt/polymind/app/chrome_crashpad_handler +/opt/polymind/app/*.pak +/opt/polymind/app/*.dat +/opt/polymind/app/*.bin +/opt/polymind/app/*.json +/opt/polymind/app/*.html +/opt/polymind/app/*.txt +/opt/polymind/app/*.so* +/opt/polymind/app/locales/ +/opt/polymind/app/resources/ + +# Startup script +%attr(755,root,root) /usr/bin/polymind + +# Desktop file +%attr(644,root,root) /usr/share/applications/polymind.desktop + +# Icon file +%attr(644,root,root) /usr/share/icons/hicolor/512x512/apps/polymind.png + +%post +# Post-installation script +# Update desktop database (if command exists) +if command -v update-desktop-database >/dev/null 2>&1; then + update-desktop-database /usr/share/applications +fi + +# Update icon cache (if command exists) +if command -v gtk-update-icon-cache >/dev/null 2>&1; then + gtk-update-icon-cache -f -t /usr/share/icons/hicolor +fi + +echo "PolyMind has been installed successfully." +echo "You can start PolyMind by running: polymind" +echo "Or find it in your application menu." + +%preun +# Pre-uninstallation script +# Clean up temporary files (if needed) + +%postun +# Post-uninstallation script +if [ $1 -eq 0 ]; then + # Execute when completely uninstalled + if command -v update-desktop-database >/dev/null 2>&1; then + update-desktop-database /usr/share/applications + fi + if command -v gtk-update-icon-cache >/dev/null 2>&1; then + gtk-update-icon-cache -f -t /usr/share/icons/hicolor + fi + echo "PolyMind has been completely removed." +fi + +%changelog +* Tue Dec 23 2025 PolyMind ftboy - 1.0.0-3 +- Add Usage Document + +* Fri Dec 19 2025 PolyMind ftboy - 1.0.0-2 +- update package for openEuler + +* Thu Nov 27 2025 PolyMind ftboy - 1.0.0-1 +- Initial package for openEuler +- Support for both x86_64 and aarch64 architectures +- Built with electron-builder for Linux \ No newline at end of file