适配Windows XP+的轻量LLM聊天工具 支持GUI/CLI与工具扩展

SimpleLLMChat is a lightweight C# application designed to make large language models (LLMs) accessible on both legacy Windows systems (like Windows XP SP3) and modern Windows versions. It offers both command-line interface (CLI) and graphical user interface (GUI) modes, works with any OpenAI-compatible endpoint, and includes a modular tool system for extended functionality.
Core Features
- Customizable GUI: The application's graphical interface allows users to adjust colors and fonts to their preference.
- Dual Mode Operation: Users can choose between an interactive CLI (REPL) or a full GUI wrapper for interaction.
- Image Support: Both CLI and GUI modes allow passing image files to compatible models for multimodal interactions.
- Markdown Rendering: The GUI can display formatted text using Markdown, making chat responses easier to read.
- Broad Endpoint Compatibility: Beyond OpenAI, the tool works with any service supporting the OpenAI v1 chat API, including popular solutions like llama.cpp and LM Studio.
- Retrieval Augmented Generation (RAG): The system can pull relevant information from local documents stored in a designated knowledge folder to enhance responses.
- Script-Friendly Output: The CLI supports a flag to output only the model's response text, excluding tool calls, outputs, and reasoning—ideal for automation. Note that tool calls requiring manual approval are automatically denied in this mode.
- Real-Time Streaming Responses: The application streams responses from the LLM server as they are generated, providing a more interactive experience.
- Extensible Tool System: A modular toolset adds functionality like file operations, memory management, web access, and more, with additional tools easily integrated.
System Requirements
- Access to an OpenAI-compatible LLM server or API. For older Windows versions that may not support modern TLS, fallback options (including required executable files) are included in the Windows XP release build.
- Windows XP (Service Pack 3 or later) operating system.
Setup Instructions
To get started, download the appropriate build for your system from the project's release page. For Windows XP, builds ending in "-XP" are recommended.
When launching the GUI executable for the first time, if a settings file does not exist next to the executable, a setup wizard will guide you through configuring all available options. Settings can be adjusted later via the application's options menu or by editing the configuration file directly.
Once configured, the application can be launched using either the GUI executable or the CLI executable.
Building the Application
The project can be built using the included batch script, which requires Visual Studio or related build tools (like MSBuild). Alternatively, the project solution file can be opened directly in Visual Studio for building.
Both building methods require the .NET 4.0 Targeting Pack to be installed. By default, builds include only core executable files, but optional supporting binaries can be added if present in the dependency folder or placed alongside their respective tools. Third-party license files are copied to the release folder if available.
Testing the Application
Test projects are stored in a dedicated folder and not included in release builds. To build and run tests, execute the provided batch scripts from the project's root directory. The build script compiles the product and test suites, while the run script executes all test suites (or a specific suite if named) and logs results to a dedicated folder.
For tests requiring external tools, these can be placed in the dependency folder before building tests, or alongside the relevant executable before running tests.
Configuration Options
The application's settings are stored in an INI file, which is created automatically by the GUI setup wizard on first launch. Settings can be modified later via the options menu or by editing the INI file manually. Key configuration categories include:
Appearance Settings: These control the GUI's visual elements, including assistant response names, font families and sizes, Markdown rendering, status message visibility, and how reasoning, tool calls, and tool outputs are displayed.
RAG Settings: These configure the retrieval-augmented generation feature, such as enabling context from previous chats, supported file extensions, chunk sizes, embedding model details, knowledge folder path, and how often information is retrieved.
System Settings: These include API keys, chat history limits, context window size, model selection, system prompts, and the LLM server endpoint URL.
Tool Settings: These manage tool-related configurations, like auto-approval rules, Jev-compatible server details, failed tool call limits, and which tools the AI is allowed to use.
Tool-specific configuration details are available in the Tools section.
How to Use
GUI Mode: Launch the graphical interface by opening the GUI executable. To adjust settings, use the options menu. Attach images via the camera icon button, start new chats, or access past chats via the history sidebar. Chat history can be exported, deleted, or imported through the sidebar context menu. A working directory can be set by creating a shortcut to the executable and specifying the "Start in" path. Send messages by typing and pressing Enter (use Shift+Enter for multi-line messages), and cancel generating responses with the Stop button.
CLI Mode: Run the CLI in interactive mode by opening the executable directly or through a terminal. Interactive commands include managing chat history, knowledge indexes, reasoning settings, and more. Non-interactive mode is also supported: use the executable with a prompt for single queries, or add an image flag to include an image with a prompt. Additional CLI flags suppress instructional text or output only the model's response.
Available Tools
The application includes 7 modular tool packages that extend its functionality. Context injectors run at chat start to maintain consistent system prompts and reuse server cache. The tools are:
- File Tools: Handle file operations like copying, deleting, editing, reading, and writing files, plus searching directories and extracting archives. Configuration options include line limits for file reading, with dependencies on archive and search executables.
- Memory Tools: Manage saved memory entries, allowing the AI to recall and search past information. Includes a context injector to summarize memories for the system prompt.
- Python Tools: Execute Python scripts, requiring Python to be installed and available on the system path.
- Shell Tools: Run system shell commands.
- Desktop Tools: Interact with the Windows desktop, like listing windows, controls, simulating clicks/keystrokes, and capturing screenshots.
- Skill Tools: Create, edit, and manage agent skills—custom instructions that enhance the AI's capabilities. Supports automatic skill updates for complex procedures.
- Web Tools: Access web content, including downloading files and videos, reading web pages, and performing web searches. Dependencies include web request executables.
Tool dependencies should be placed alongside tool executables; release builds include most required dependencies, except Python.
Credits
The following contributors have provided support for the project, including building required components for older Windows versions and design elements.

