PromptPulse Development Notes: Choosing Electron and Packaging Local Models

March 4, 2025

In early 2025, Claude Desktop and MCP caught my attention. Many people were just discovering how to let a model use local tools. I wanted a similar desktop client that also included the model: download the app and chat locally, without signing in, configuring an LLM API or even installing Node.js or Python first. Ideally it would work across desktop operating systems.

That was the idea behind PromptPulse. Electron let me reuse my React and web experience. Delivering the model, native dependencies and runtime together took most of the work. I temporarily switched to Ollama, continued exploring ONNX and eventually got generation and streaming working in a separate Node sidecar experiment. The aim throughout was for the application to handle as much environment setup as possible.123

Dating note: I use March 4, 2025, from the project’s early days. Midnight is a date placeholder, not an actual writing or publication time. last_modified_at follows the last project commit 2545d1b, June 8, 2025 at 18:44:47. References generally use that historical cutoff, with known access dates identified separately. I assembled the first draft on November 17, 2026; see editorial_verified_at for the latest check. It recounts development and experiments from March to June 2025. Times are Beijing time. Commit times come from Git, conversations from Cursor. Some user messages lack timestamps, so adjacent replies establish the date. Motivations or experiments I could not tie to a specific implementation are identified as recollections.

Where the project started

I wanted PromptPulse users to define their own agents. For example, the Open WebUI community has an assistant called Nikolas Tesla. Its system prompt imagines Nikola Tesla in the present day, discussing AI through his experience with electricity and wireless communication.4 I wanted users to write a persona in the client and simply select it next time.

GitHub records creation of the repository at March 2, 2025, 17:19:27. The first commit followed one second later. Creation time alone does not establish when the repository first became public. Here are its first five commits:1

TimeCommitWork
2025-03-02 17:19:28a53b7b3Initial commit
2025-03-04 16:28:2732c04f1Set up project
2025-03-06 19:01:388f21e00Add node-llama-cpp
2025-03-06 19:04:03b899563Add Electron Forge
2025-03-06 19:05:17036bea3Fix Express service startup

The project combined a React frontend, Electron desktop entry point and local Express server. web held the UI, desktop the window, preload script, local service and packaging configuration, and core some shared logic. Early model code loaded qwen2-1_5b-instruct-q4_k_m.gguf through node-llama-cpp. We later added streaming replies, SQLite storage, JSON conversation records, MCP connections and tool calls.56

This explains my early interest in packaging. A working chat interface alone did not make the product ready to download and use.

Why I chose Electron

Electron let me retain my existing React and web UI while accessing desktop windows, files and the Node ecosystem. Later, to reuse model tooling and improve runtime stability, I compared Flutter, Tauri, Python GUIs and a Godot frontend with a separate Node or Python backend.

How the UI, inference runtime and installer fit together is covered in Choosing a cross-platform desktop AI stack. Electron’s bundled Node solves part of the runtime problem, but native dependencies and model resources still need to ship correctly. Here I focus on PromptPulse’s implementation.

Reading open-source client implementations

I searched for claude desktop opensource and found Karenina-na’s Claude-Desktop, litongjava’s tauri-claude and Dive. I opened the source both to compare frameworks and to understand desktop application and frontend page organization.

Each offered a different reference. Claude-Desktop is an unofficial Electron client. Its src/router/index.ts uses Vue Router to organize the home, settings, prompts and notes pages.7 In tauri-claude, the Tauri window points straight at https://claude.ai/. That illustrates wrapping a website in a desktop window without packaging a model runtime.8

Dive was closer to the tool-calling client I had in mind. Its March release was already positioned as an MCP host supporting multiple models and both stdio and SSE connections.9 I return to its tool configuration and runtime packaging later. My goal remained to ship the model for local use; these projects helped me compare ways to build it.

Hugging Face’s Chat UI provided a ready example. Open its hosted HuggingChat instance, choose a model and start talking. The Chat UI docs’ Ollama example points the same interface at a local inference service.10

Connecting the React interface to Electron

Earlier research on React hydration and lazy loading had introduced me to React Router, Remix and Next.js. On February 27, before the PromptPulse repository existed, I searched remix to electron and then electron with react. Electron Forge’s React guide led me to React’s “Add React to an Existing Project.” Forge starts at the desktop window, importing a React component at the renderer entry. React starts from the page, using createRoot to select an existing HTML element in which to render the interface.1112

Early on March 2 I asked Cursor in the electron_play workspace how to create a React app and connect it to my Electron window. I was still experimenting in directories named my-electron-app and my-react-router-app.13

Local resources, why homepage did not work, and navigation versus resource requests are covered in Why can’t Electron find the JS and CSS when loading a local React page?. By March 4 PromptPulse built the frontend with Vite and used base: "./" to generate relative asset paths. Electron opened the built HTML with loadFile, and the page used createRoot to mount React on #root.14

I investigated how React calls the main process through preload, when it needs a return value and how the UI receives model status. This connects with a later reading of node-llama-cpp’s birpc example in From interprocess communication to Electron IPC: calling the main process with contextBridge. The March 4 code already used IPC to switch the Express server’s port, keeping both HTTP and IPC.14

On March 3 I asked how to start and stop Express in Electron, switch ports from the UI and handle errors closing or listening again.15 In the Stack Overflow discussion “Starting and stopping node app from inside Electron app,” an answer showed server.close() and then listen() again. The questioner ultimately ran a separate program as a child and terminated it independently.16

The former controls a listening server; the latter controls a process. My March 4 code ran Express inside the main process, closing the listener before opening another port. That did not terminate Electron itself.15 The reading foreshadows the later sidecar, but that implementation did not ship an additional Node executable.

Building the chat UI with Tailwind

I used Tailwind to adjust the input, buttons and eventually chat bubbles, and read its Vite and React Router installation guides. By March 4 PromptPulse configured @tailwindcss/vite, called tailwindcss() in Vite’s plugins and added @import "tailwindcss" to CSS. The frontend used ordinary React and Vite; the React Router guide more likely related to the earlier my-react-router-app experiment.1718

I looked up hover and focus states. In a March 2 input-form experiment in electron_play, I adjusted button placement, spacing, contrast, focus borders and shadows, and reported that hover did not behave as expected. By March 6, with a full chat window, I was refining bubbles, container height and button states in light and dark themes.19 Early hover: and focus: styles reflect this.18

Resizable desktop windows also needed responsive layout. On March 8 the code used max-w-xs md:max-w-md lg:max-w-lg to adjust bubble maximum width by viewport size. That breakpoint addressed layout inside the window without establishing full mobile support.1718

From launching locally to distributing the app

I read Electron’s distribution overview and Forge’s make, publish and makers documentation, covering packaging, platform artifacts and publication. The repository configured Squirrel for Windows, ZIP for macOS and DEB and RPM makers for Linux. Configuration alone does not show that every platform was tested.20212223

I was also thinking about window buttons, frameless windows, closing and tray behavior, and frontend access to desktop capabilities. My references include webPreferences and articles on custom title bars and minimizing to the tray. They document the questions I considered, not a list of implemented features.24252627

Production packaging needed separate diagnosis even when development worked. On March 14 I told Cursor that IPC replies arrived in development but not in production. A March 17 report that something worked standalone but not in Electron concerned an SSE connection. It does not show that the model itself had already run under independent Node.28

Loading a GGUF model in Node.js

I searched for run gguf model with node js, found node-llama-cpp and needed to know where to get model files, how to download them and how to load them in JavaScript. “Getting a Model File” and “Downloading Models” showed sources for GGUF and how to download to a local directory.29

One model came in several files. “Choosing a File to Get” explained the trade-offs among size, memory and answer quality for quantized versions. It recommended trying Q4_K_M first.30 My March 6 commit loaded qwen2-1_5b-instruct-q4_k_m.gguf, created LlamaChatSession and tested conversation in Chinese and English and a follow-up summary. That shows the invocation code existed, without recording the outcome of every run.31

I also browsed the Text Completion and Embedding guides. Completion uses LlamaCompletion to continue input text. Embeddings convert text into vectors for similarity and semantic retrieval. These are distinct from multi-turn chat in inputs, outputs and application handling. They were research directions rather than confirmed client features.32

The Chat Wrapper and Chat Session guides helped with chat integration. The former explains how each model formats system prompts, user messages and assistant replies, and what ends a turn. LlamaChatSession selects a wrapper automatically or accepts one explicitly. My early code did not set chatWrapper and used automatic selection.3331

When calling prompt() repeatedly, I wanted to know how earlier turns participated in the next generation. On March 8 I asked Cursor:

how this prompt function pass chat history to the model

— My conversation with Cursor, retaining the original spelling.34

The Chat Session guide’s consecutive questions, streaming and session-saving examples clarified this. The session manages history and the wrapper formats it for the model. Reusing a session avoids manually concatenating the entire conversation. Restoring it after quitting requires saving history and using an interface such as setChatHistory(); an in-memory session is not persistent storage.35 The March 8 code wrapped session.prompt(prompt, options) in sendPrompt, letting callers reuse the session.5

I read the guides for stopping generation and streaming segments so the UI could show partial replies and stop when needed. In v3.6.0, onTextChunk receives plain text. onResponseChunk also supplies segment type, distinguishing ordinary replies and model-supported thought segments. Stopping uses AbortController and a supplied signal; stopOnAbortSignal: true stops while retaining the generated portion. These belong to this API and differ from later Transformers.js streamers and stopping criteria.35

The official Electron example showed coordinating model operations and UI state through birpc. I cover its source in the separate IPC article. My own model integration still centered on local Express endpoints and sendPrompt.5

Downloading into a development directory and delivering to end users are separate stages. Reading the download guide does not establish I built automatic downloads into the client. The next task was shipping the model, inference dependencies and application together.

I also considered speech and image models

I considered transcribing speech into chat input and exposing other models as tools the LLM could select. I researched Whisper, FunASR, SenseVoice and running Stable Diffusion in Node.js, without attempting integration. I remember few Node runtimes for other modalities and considered shipping Python as a sidecar to reuse its ecosystem. See Adding speech recognition and image generation to a local LLM client: runtime research. The exact research dates remain to be established.

Model packaging problems in March

For my own experiment one GGUF was enough. For a distributable client I probably wanted several versions so users could choose for their computers: fewer parameters or more aggressive quantization at the same parameter count for limited memory. That likely prompted my “multiple model files” search.3036

Before offering choices I needed to get even one model onto another machine. On March 6 the code hard-coded ../../models and pointed to a Qwen2 1.5-billion-parameter Q4_K_M model. I knew where that was in my development tree, but where would it point after another person double-clicked the installed app? I read an Electron local-model example and pasted my filename into Cursor.3136

qwen2-1_5b-instruct-q4_k_m.gguf how can i package this model file into the production build of electron and make the code runnable whiling accessing this model

— My conversation with Cursor, original spelling retained.28

The app also had to distribute node-llama-cpp, which reads the model. Its docs required treating the dependency as external so it could be loaded from the module directory at runtime. I asked Cursor how to configure this in Forge and what Webpack should process. The model and runtime had to ship together but had different packaging requirements.37

LayerQuestion to resolve
JavaScript bundlingShould the dependency be external to the app’s JS bundle, with runtime module files retained?
ASAR archiveWhich files can remain in app.asar and which native binaries require a real filesystem path?
Model resource copyingWhere does the GGUF end up, and how does production find it?
Additional runtimeIs a separate Node or Python executable shipped to launch inference?

The first three points do not imply that an extra Node runtime has been packaged.

The v3.6.0 docs for node-llama-cpp already described Electron support and required using it in the main process. They also warned:

The file structure of node-llama-cpp is crucial for it to function correctly, so bundling it will break its functionality.

— “Bundling” section.38

Bundling here means including a dependency inside the JavaScript bundle. The docs allow ASAR to preserve the package directory structure but require native binaries outside the archive. JavaScript packages, native bindings, dynamic libraries and model files can have different packaging locations. Forge’s Vite native module docs, its auto-unpack plugin and my saved ASAR searches all concern this distinction.394041

I also read Electron’s ASAR docs. Externalizing a dependency means loading it from its module directory at runtime, not leaving it out of the installer. ASAR determines how files are archived. Electron lets some file APIs treat ASAR as a directory, but the archive is read-only and some native calls need a real path. Retaining dependencies, unpacking native files and copying model resources therefore require separate handling.3841

My saved link to Forge’s Build Lifecycle page included q=asar. It divides distribution into package, make and publish: create an application package for the platform, make an installer or archive, then publish it. Rebuilding native Node modules belongs to Package, whereas JavaScript bundling is separately configured. Reading this alongside the Vite and auto-unpack docs clarified when dependencies are built, which files need to sit outside ASAR and when distributable artifacts appear.423940

I read electron-vite’s introduction, Build, Distribution and Assets docs to understand main, preload and renderer builds, output locations, packager handoff and resolving copied or unpacked files. These questions went beyond missing page JS and CSS to inference dependencies and models.43 On March 4 I tried configuring main and page entry points in electron-vite. The repository ultimately retained the frontend’s own Vite configuration, moving frontend output to ../desktop/dist on March 6. See Getting started with Vite and debugging the build for the original errors and retained setup.

The early code used __dirname to search upward for models, whereas Forge used extraResource to copy the model. Development and production resource directories differ. A local March 14 stash changed the production path to models under process.resourcesPath and adjusted unpacking of native dependencies. It records a troubleshooting attempt, not a verified release.2844

That day I also tried migrating the electron-builder configuration from node-llama-cpp to Forge and encountered these errors in sequence:

ReferenceError: os is not defined
TypeError: invalid pattern

The first happened while Forge read the configuration, the second during ASAR unpack-pattern matching. They show I was still working through syntax and artifact layout and cannot all be attributed to model memory use.28

Following resource paths down to minimatch

Additional saved links help explain the investigation. A Stack Overflow question described Forge images loading on a development server but going missing under filesystem paths after packaging. It concerned images in a Webpack template rather than my GGUF file, but both raised the question of whether relative source paths survive packaging. That probably prompted the visit; its fix cannot simply be transferred to model loading.45

Based on the saved visit order, I reconstruct another search trail below. Arrows in the references reflect remembered navigation, not timestamped browser history:46

Where I lookedLikely question
Search extraResource: [ "models" ], then extraresources electron forgeHow should the model directory be copied into the installer?
packagerConfig in Forge ConfigurationDoes Forge handle this setting itself or pass it to another tool?
Electron Packager’s Options and asarWhich options govern resource copying and ASAR, and what types do they accept?
minimatch FeaturesHow do glob patterns used by unpack/unpackDir match multiple directories?

This went beyond path resolution. Forge passes packagerConfig to Electron Packager, and ASAR unpacking uses glob matching. One part concerns the copy destination, the other which files remain outside the archive.46

I found a closer explanation for invalid pattern: my local minimatch 3.1.2 throws it for a non-string argument, and the stash set asar.unpack to an array. Packager expects a glob string. This supports a configuration type mix-up during migration. The stack also passed through unpackDir, and the stash postdates the error, so it cannot establish the precise failing configuration.2846

SurfaceData’s local-llama-electron project provided another reference. Its pre-March 2025 Forge configuration listed Vite main, preload and renderer entries but had an empty packagerConfig. That illustrates project organization without demonstrating correct delivery of model resources or an independent Node runtime.47

Native modules and build fallback are another layer

I remember this research starting with chat storage. Looking into better-sqlite3 showed me that changing platforms could require a rebuild. Some npm packages contain native binaries alongside JavaScript and need a matching runtime. I searched Native Node module, found Electron docs and followed build, compatibility and packaged loading because my own client would face similar distribution issues.4849

Two SQLite questions on Stack Overflow helped frame this. One concerned Electron, React and better-sqlite3 and a tooling failure while upgrading an old project. It had no solution but raised relevant native module questions.50 Another concerned sqlite3 working in development but disappearing after packaging. Answers discussed a packaging command excluding node_modules and rebuilding dependencies in the packaged app at afterCopy.51 Could the dependency load in the target Electron runtime, and was it actually included in the final package?

I read Node.js’s C++ addons docs to understand building and loading native modules and why they do not travel across systems like plain JavaScript.52

What is a .node file in an npm package? It is a compiled native extension dynamically loaded by Node and exposing functions or objects to JavaScript. npm distributes packages that can include JS wrappers, C/C++ sources and prebuilt binaries. Node’s docs describe the target in binding.gyp, build addon.node with node-gyp and load it with require(). That explains why installation of some npm packages invokes a compiler.52

Why rebuild for a different OS or for Electron? A native binary must match OS, CPU and runtime interface. Linux binaries cannot ship as Windows builds; x64 and ARM64 also require appropriate artifacts. Even on the same OS and CPU, Node and the target Electron ABI can differ. Obtain a matching prebuild or rebuild for the target. Electron documents @electron/rebuild and Forge integrates relevant steps. Prepare compatible dependencies before distribution so end users do not have to compile them.4852

Must every Node upgrade trigger a rebuild? Extensions using V8 or internal Node APIs are more sensitive to versions. Node-API supplies ABI stability across Node versions for qualifying extensions. That does not make one binary portable across operating systems or architectures or guarantee compatibility with arbitrary native libraries. Check the specific interface and supported target artifacts.52

Two other searches asked why node-llama-cpp was not packaged as a native dependency and how to specify native dependencies manually. Together with the native module docs and unpack plugin, they suggest I suspected that Forge might not find the inference bindings or leave required files in the right place.48

What does ASAR unpacking solve? .node is a dynamically loaded native library, whose loader needs a real path. Although many APIs can read ASAR like a directory, calls such as process.dlopen may require temporary extraction. Keeping files under app.asar.unpacked avoids that runtime extraction, without changing binary compatibility. Rebuilding makes a file compatible with the target; unpacking makes it available at a real path.4152

Marking an npm package “native” is not enough. Forge 7.7.0’s auto-unpack plugin appends a glob matching .node files. This does not automatically arrange model files, other dynamic libraries or complete runtime directories.53

I read “Building From Source” about compiling llama.cpp with CMake when prebuilds were unavailable or failed to load. This builds the inference engine and bindings, not a GGUF conversion, and I have no record confirming that I actually tried it.54 The LlamaOptions.build source for node-llama-cpp v3.6.0 clarified another difference: ordinary Node defaults to auto and can fall back to compilation when no suitable build exists. Electron defaults to never, and running inside ASAR precludes compiling from source.55

This suggests one explanation for working in system Node but failing in Electron: a development machine with build tools can compile a missing binary, while Electron does not automatically recover the same way. The explanation fits the documentation but is not a confirmed cause or an explanation for every later memory error.

Choosing local storage for conversations

I was exploring conversation storage for an Electron client. I searched better sqlite3 with electron forge and electron forge better-sqlite and read RxDB’s overview of Node.js databases. For a download-and-use client, I wanted persistence, recovery after restart and dependencies that could ship with the app. The storage backend could be a local application layer without a remote database service.5657

Those clues address different layers. RxDB described JavaScript databases and storage layers backed by different engines, useful for general selection. Searches already naming better-sqlite3 and Forge suggest checking concrete SQLite build, loading and packaging behavior. The search alone does not tell me whether that was before adoption or during troubleshooting.5657

The code used better-sqlite3 for model interaction data, including content, user, project and token usage fields. Saved issue #538 discussed cross-platform builds of Electron native dependencies. Even bypassing local inference would leave database packaging work.496

A separate history implementation followed on March 17. Commit 925a9b7 added json_db_utils to write messages and session information into chat_histories JSON files in Electron’s user data directory, alongside a history sidebar. I researched several storage approaches; RxDB was reading material, while the repository actually contains both a SQLite data module and JSON chat history.6

Later I stored browser chat history in IndexedDB for Meowssenger. See Choosing a local database for Node.js and the browser for the boundaries among Node, browsers and Electron.

Temporarily switching to Ollama

After reading the official examples I continued implementing chat. The March 8 commit integrated it, and on March 12 I fixed the creation of a fresh session on every call, which lost conversation history. On March 14 I was still troubleshooting node-llama-cpp loading in production packages.55828 Understanding how to call inference from the UI did not guarantee reliable delivery of models and native dependencies.

On March 16 I committed an explicit change of direction:

remove support for local models with node llama cpp for now, switch to ollama api support

— Excerpt from the description of commit e96db8f.59

The change disabled the original inference endpoint and pointed the frontend at local Ollama. Chat and MCP development could continue, while the goal of installing an app with a usable model remained unmet. Residual node-llama-cpp files and dependencies do not establish that built-in inference stayed enabled.

I see this as temporarily stepping around unresolved delivery problems so client development could continue. I cannot recall which failure finally prompted the switch. A later Vulkan error has no established date and cannot be treated as the sole reason.

I browsed ollama-js but do not recall adopting it, mainly for compatibility. I wanted to support different model services and preferred their corresponding OpenAI or Anthropic SDKs to organizing calls around Ollama’s proprietary interface. The March 16 commit actually used direct HTTP calls to local Ollama.5960

Ollama’s OpenAI compatibility article addressed this integration question. Its introduction said:

“Ollama now has built-in compatibility with the OpenAI Chat Completions API”61

It showed reusing the OpenAI request format or pointing an OpenAI SDK’s baseURL at http://localhost:11434/v1 to use a local model. Supporting the OpenAI Chat Completions format differs from actually importing the SDK. My March code could make such requests with fetch.

To understand how JavaScript should receive and handle Ollama output, I searched ollama api js respone handle. I remember doing this around the same time I read docs/api.md in the Ollama repository, checking request parameters and response formats while working on chat reception. Its explanation of the chat endpoint said:

“This is a streaming endpoint, so there will be a series of responses.”62

Those two documents map to two concrete integration paths:

InterfaceCode at the timeWhat the docs explain
Native Ollama /api/chatMarch 16 ChatView.jsx using qwen2:1.5b-instruct and stream: trueSubmit messages, read message.content, detect done and generation statistics
OpenAI-compatible /v1/chat/completionsMarch 19 MCPChatView.jsx using qwen2.5:3bSend Chat Completions requests, read choices and continue into tool-call processing

These paths appear in the March 16 and March 19 commits.5963 api.md also lists model pulling, querying and management; my first priority was chat. Switching endpoints required changing parsers because the two chat responses differ.6162

To show replies as they arrived I also read OpenAI’s streaming docs. Introducing the Responses API, they explained:

“The Responses API uses semantic events for streaming.”64

I needed to handle completion and failure as well as arriving text. The native Ollama frontend read a stream of JSON objects and extracted text from message.content. Different endpoints expose different events and fields, so the parser must match. Application task logic decides whether a complete reply should lead to another tool call.

How many tokens (small units of generated text) can pressing Stop save when the first few sentences are off track? First ask which step the button controls. Humboldt described giving a fetch request the cancellation signal from AbortController and calling abort() when Stop is clicked. On AbortError, the UI can show “stopped.” The client then stops receiving. To save subsequent output tokens, the provider must also detect the disconnect and stop generating.65

In a 2023 streaming experiment, Foxalabs observed about 7–30 extra tokens after disconnection. Asked whether users paid only for output they received, they replied, “plus some amount of tokens that get sent prior to the disconnect being detected up the chain, yes.” Stopping can save output that otherwise would continue, but tokens already sent before the upstream detects it count too. The 7–30 range was one experiment’s observation.66

Making sense of MCP connections and state in March

Once the model could answer questions, it still had to actually call tools. To understand MCP, I remember reading about message exchange, transport selection, disconnection, and the Java and TypeScript SDKs. The saved architecture documentation URL now includes 2026-07-28. Here I describe the connection mechanics using March's code and the 2024-11-05 specification already available then.6768

Enabling MCP tools for a model integrated into my own client

I searched for client.chat.completions.create tools to learn how to add tools to model requests, then read documentation on text generation, tools for Agents, and function calling. The search sequence reflected a concrete question: now that chat requests worked, how could the model propose a tool call for the client to execute?69 The London weather example in the Prompt Engineering Guide illustrates the flow: the model supplies the weather function and its arguments (London, Celsius), the application queries the service, and the temperature goes back to the model.70

In PromptPulse I needed to connect “model proposes a call → client executes it via MCP → result goes back to model.” In my later research on coding agents, reading files, editing code, and running tests required a similar loop.

There were relatively few tool-capable models I could find at the time, so I filtered Ollama's Tools category. The client needed the model to decide when to call a tool, which one to use, and what arguments to supply. Generating chat replies alone was insufficient.71

I tested web access and browser operations with the tool-capable Qwen2.5. The March 19 implementation specified Ollama's qwen2.5:3b, sent requests to the local /v1/chat/completions, and supplied frontend-defined Puppeteer tools through tools. When the model returned tool_calls, the client extracted names and arguments, converted them into MCP tools/call, asked the server to perform the browser operation, and returned the result to the model.63 Compare request tools and reply tool_calls with OpenAI's Chat Completions documentation.72

For example, when the model chose the tool for opening a page, its arguments were text of the form {"url":"https://example.org"}. This excerpt adapts the March 19 code to show the client executing and recording a call. res is the model reply. callTool is the project's function for sending requests to the MCP server.73

const choice = res.choices[0];
if (choice.finish_reason === "tool_calls") {
  for (const call of choice.message.tool_calls) {
    const args = JSON.parse(call.function.arguments);
    const result = await callTool(call.function.name, args);
    for (const item of result.content) {
      if (item.type === "text") {
        messages.push({ role: "tool", content: item.text });
      }
    }
  }
}

What helped when Qwen2.5 rarely called browser tools successfully?

I remember tool-call success being low in the web demo with qwen2.5:3b. I thought the small model was struggling with browser tools and looked for similar experiences. Few-shot prompting eventually resolved the issue in the demo. I put several complete conversations in the system prompt to show what the user asked, which tool to invoke next, and how to continue after the result.74

How can you tell the model actually called a tool? On the OpenAI forum, sfsean posted a particularly clear example. Asked for time and news, the model correctly named getCurrentTime and getNews in its reply text, yet the response ended with "finish_reason": "stop". A human could read the intention, but the program had no executable call. In the same thread _j suggested “showing it multi-shot turns of both responding directly and calling the function.” That captures what examples need to teach: which questions can be answered directly and when the next step belongs to a tool.75

If tools already lists functions and parameters, what belongs in the system prompt? The original poster, t.haferlach, asked how to write example calls. They had tried duplicating function definitions in the system message without noticeable improvement.76 On March 19 I read an OpenAI developer community discussion. In post 3, merefield suggested highlighting functions you want the model to favor. In my implementation tools described available browser operations, while the system prompt said when to use them: for a question requiring a web lookup, open the page and read its content before answering from it.7763

That day I also read LangChain's tool-calling experiments. One example deliberately defied mathematical intuition: calling negate on -100 still returned -100, but the model answered 100. Only after the user said “Please refer to the output of your tool call.” and it called the tool again did it revise its answer.78

I kept the math example in a March 19 code comment. The actual system message sent to Qwen2.5 demonstrated web operations. In one exchange the model retrieved a news headline by opening a page with puppeteer_navigate and reading h1 using puppeteer_evaluate. The sample user said the headline was old and wanted the one with .live, so the next step read h1.live and answered with the newly retrieved title. On March 22 I extracted the examples into tool_call_few_shot.6374

Once the model selects a tool, what remains for the client?

In post 19 of the same thread, sfsean showed another response. Its text had already answered the dog's name and current time, while the same message's legacy function_call field requested a news lookup. A client that ended the turn as soon as it saw prose would miss the lookup.79 In my March 19 implementation, when finish_reason was tool_calls, I first added the text to the chat bubble and then executed the requested tools in turn.73

Suppose someone asks for the weather in San Francisco, Tokyo, and Paris at once. If we use the same weather function three times, how does the model associate results with cities on the next turn? Minyang Chen's example first adds the whole model message requesting the calls to history. The program then looks up each city, adds each result as a tool message, and puts that call's identifier in tool_call_id. Even with the same function name, each result matches the original call with its city argument before the model is asked to answer.80

The earlier forum question's author later realized they might have omitted the model's preceding reply.81 My March 19 PromptPulse added the browser's returned text to history as a tool message, then appended a prompt to continue after reading it. That version omitted the model message that originated the call and the corresponding call identifier.73

With browser tools connected, I still needed a browser to operate. I researched browser-use, Puppeteer integration with Electron, and Nightmare. The working approach launched local Chrome. For the options, configuration-free goal, and task progress, see Browser Automation in an Electron Client.82

A model's tool-calling capability and a client's MCP support are different. Ollama's Tools category describes models capable of returning tool calls via their inference interface. MCP specifies how a client discovers and invokes server-provided tools. The application must pass MCP tool descriptions to the model and dispatch its proposed calls to MCP. A tool-capable model does not establish MCP connections itself, and a connected client cannot guarantee any model will select and invoke tools correctly.6883

I also read OpenAI's Structured Outputs documentation to understand machine-processable results. It distinguishes calling functions supplied by an application from making the model's own answer match a specified structure. The former uses function calling, while the latter can constrain output with a schema. Compared with ordinary JSON mode, the documentation emphasizes:

“only Structured Outputs ensure schema adherence.”84

A “successful” tool call can mean several things. Someone testing GPT-4o-mini on an order delivery date wrote, “only 3 succeeded when I sent 10 requests.” A reply suggested adding strict: true to constrain argument structure. Their ten trials counted whether the model returned the expected call. Strict mode constrains which fields arguments can contain and their types.85 The client must still handle request failures, model refusals, and truncated output.84 Even correctly formatted arguments can contain the wrong values. If a web tool expects a script, both a script that reads the ordinary headline and one that reads the live headline are strings. Only the latter answers the follow-up in the example.74

A LocalAI discussion illustrates structurally correct arguments containing the wrong thing. Bunder2015 defined a string argument requirements for a tool updating project requirements. The model supplied the field description, “The new requirements for the project,” verbatim as the new requirement.86 In the same thread, the original poster lenaxia saw a different symptom: adding function definitions made the model echo the input. Before closing the issue, they wrote that adding response_format: {"type": "json_object"} to the request resolved their case.87

My PromptPulse code parsed arguments with JSON.parse(toolCall.function.arguments), and on March 22 I also experimented with adding strict to tool definitions. The request went to local Ollama.88 The few-shot prompt for the web demo also illustrated choosing the next step based on the preceding tool result.74

Searching for how an LLM could use MCP led me to a Llama/MCP example Philipp Schmid published in January 2025. It showed the glue required in the chat application: retrieve MCP tool descriptions, convert them into the model API's function-calling definitions, dispatch proposed calls through MCP, and return results to the model.89

This mattered for both of my projects. PromptPulse connected model, conversation, and tool execution. Lite MCP SDK helped me separate the underlying messages and connection logic. The two investigations complemented each other. Schmid used Hugging Face's hosted inference service; distributing a model and runtime together remained a question for my desktop app.89

Thus “Inspector can call a tool” and “the model in chat uses it correctly” are separate tests. The first checks the protocol and server; the second also checks tool descriptions, returned arguments, and whether results enter subsequent conversation. See “How an application connects a model to MCP” in What Is MCP?.

One-way SSE transport and two-way MCP messages

What I remembered was “EventSource, persistent connections, heartbeats, and returned status.” More precisely, the HTTP+SSE transport used then exchanged messages bidirectionally through two paths, HTTP POST and SSE. SSE/EventSource itself carried server-to-client messages. MCP also supports stdio, so the protocol as a whole is not synonymous with EventSource.68

Step in a legacy HTTP+SSE connectionDirection and purpose
Client opens SSE connectionEstablishes a channel for events from the server.
Server sends endpoint eventTells the client which URI to POST messages to.
Client sends JSON-RPC messageSent to server by HTTP POST.
Server sends JSON-RPC messageDelivered to client via SSE message event.
Both sides continue according to negotiated capabilitiesAlong with request results, there may be notifications and server-initiated requests.

I also saved the official TypeScript SDK's src/server/sse.ts. In the historical March version, start() emits the endpoint, handlePostMessage() receives and hands off client messages, and send() returns protocol messages over SSE. The POST returning 202 Accepted and a tool result arriving are different paths. This explains why checking one HTTP request for success doesn't establish that the tool call worked.90

A log on the /sse route therefore only establishes that a request arrived. It doesn't prove endpoint delivery, initialization, capability negotiation, and subsequent messages all worked. The older spec requires an initialize request and response followed by a client notifications/initialized. Disconnection closes the underlying transport. There is no separate universal MCP shutdown message.68

Heartbeats also deserve precise wording. The older Ping specification says:

The Model Context Protocol includes an optional ping mechanism

— Opening of “Ping” in the 2024-11-05 specification.68

Either party may check responsiveness, and the recipient of a ping must respond promptly. The spec recommends periodic checks and configurable frequency. It does not require sending heartbeats continuously at a fixed frequency. Request timeout, progress notification, and connection liveness are distinct. My code documents request timeouts and connection state, but does not establish that I implemented scheduled heartbeats.

Inspector as a test harness and a possible code reference

I remember Cursor's coding model still being unreliable on some MCP invocation details. To get the implementation right, I'd find official source and examples myself, understand how the calls fit together, then give Cursor more specific changes. Files such as SSEServerTransport helped me learn the protocol and check generated code for connection setup, messaging, and closure. That reading and debugging was important for controlling code quality.9091

The use of Inspector for testing is directly recorded. On March 17 I told Cursor that standalone operation worked, but after moving into Electron the SSE route printed a log while MCP Inspector still failed to connect.28

Comparing the code, I likely consulted Inspector's connection logic too. The UseConnection.jsx added March 19 retained the mcp-inspector client name, proxyServerUrl, request history, and comments about first routing through the Inspector proxy. Each has a counterpart in Inspector's March 17 useConnection.ts. This inference follows from code comparison and doesn't identify the exact commit I consulted or the suggestion that introduced it.9282

I specifically visited lines 3 and 233 of useConnection.ts. In my local March version, line 3 imports SSEClientTransport, and line 233 is the following comment:93

Inject auth manually instead of using SSEClientTransport, because we're proxying through the inspector server first.

The following code passes authentication headers both to the eventSourceInit used to open the SSE connection and the requestInit used to send requests. In light of my own connection implementation, this was likely where I investigated which component the browser connects to first, how the proxy relays it, and how both HTTP channels carry authentication. Following usage from a component into the transport implementation connects UI operations with actual communication.8293

It also helps separate Inspector's architecture from MCP requirements. Inspector then had a browser interface and a proxy service. Arguments such as transportType, command, and args belong to its own architecture. When moving the connection logic into my client, I needed to recheck what each address and parameter referenced. Those proxy parameters were not all protocol fields.92

I applied the same MCP research across PromptPulse and Lite MCP SDK. Implementing the client exposed concrete connection and call problems, and dissecting the SDK helped explain their protocol logic. These records show the two strands progressing together:

DateContemporary record
March 19Added an MCP frontend client. The backend provided /sse and /messages routes, and the commit described progress connecting to the Puppeteer service.
March 21Created the Lite MCP SDK repository with only a LICENSE in its first commit.
March 23Added SSE address settings, connect button, and disconnect handling. Closed the connection on failure, handled request timeouts, and adjusted frontend connection state.
March 27In the MCP_Lite workspace, I pasted SDK schema code into Cursor and asked how it related to JSON-RPC, including definitions for initialization, ping, and notifications.
March 29Continued investigating SSE client/server problems in Lite_MCP_sdk, and committed a JavaScript SDK implementation and tests.
April 3At 18:46 the PromptPulse frontend switched to MCPClient from litemcpjs to establish connections. At 19:03 the backend passed its Express app, middleware, handlers, and Puppeteer tool definitions to MCPServerInit from the same package.94

Another local Lite MCP SDK checkout retains a client SDK commit at 15:39 on March 29. Tests committed that evening imported my own Client and SSEClientTransport directly and retained the mcp-inspector name and sampling capability declaration. The server included a method for sending sampling/createMessage. This establishes SDK-level implementation and tests, but the test script's name alone doesn't establish that the Inspector UI ran.95

Thus the localhost:5173/#sampling I remember visiting could also have come from Inspector while debugging Lite MCP SDK. The URL identifies the Inspector tab, without recording the project it connected to. I cannot attribute that visit exclusively to PromptPulse or infer a complete sampling call just from the visit.

After I moved connection and tool registration into litemcpjs, PromptPulse still selected the model, passed tool arguments, and fed results back into conversation. For the protocol itself, see What Is MCP? From Tool Calling to Protocol Internals.8295

My March code used legacy HTTP+SSE. On June 9 I researched the difference from Streamable HTTP, introduced March 26: in the newer transport, a tool call can get its result directly in the POST response. For which request to inspect in the network panel for each version, see Where does a tool result come from with Streamable HTTP?.6896

ONNX experiments and a separate Node sidecar

I kept experimenting with ONNX and Transformers.js to retain models locally and ship them with the app. After encountering dynamic library loading and Electron memory issues in May, I moved inference into a bundled Node process in the separate Node-Sidecar-Electron project. Electron handled UI and communication. That worked, but it wasn't merged directly into PromptPulse as a released built-in model feature.23

The ONNX experiments, runtime limitations, model resources, and packaging a separate Node runtime are described in Running Local ONNX Models in Electron with a Separate Node Sidecar.

Recording the Vulkan error separately

Later I recovered another search entry from that investigation:

node llama cpp ggml_vulkan: Requested buffer size exceed

The search URL preserves my line of inquiry. While editing this article I added the original error below, shown as two separate messages:9798

ggml_vulkan: Requested buffer size exceeds device memory allocation limit: ErrorOutOfDeviceMemory
[node-llama-cpp] ggml_gallocr_reserve_n: failed to allocate Vulkan0 buffer of size 6595743744

What failed here was a Vulkan0 buffer allocation of 6,595,743,744 bytes, about 6.14 GiB. The error explicitly says the requested buffer exceeded the device memory allocation limit. This provides more information than the search query but doesn't state the actual device limit or establish model file size or exhaustion of all GPU memory. It certainly doesn't establish that Electron hit a JavaScript heap limit. The date, build, and device details remain to be recovered.98

I found llama.cpp issue #11598 while editing. It records an early-2025 case of a single Vulkan buffer allocation limit. The error text matches, but the requested size differs. That case ran standalone llama-server, showing the error can also occur outside Electron. It's a related case, without establishing identical device or backend limits in my case.99

Today I would record these problems separately:

SymptomFirst place to investigate
GGUF or model directory missingWere resources copied, and is the production path correct?
Missing .so or native module import failurePlatform dependencies, dynamic library search paths, real files outside ASAR.
Child process receives SIGTRAPKeep stderr and crash details, then check native module and runtime compatibility.
ggml_vulkan buffer allocation errorVulkan backend, driver, allocation size, and related limits.

Calling all of these “insufficient memory in Electron's bundled Node” loses distinctions that mattered during troubleshooting.

Investigating rich text and artifact canvases

My browsing history also includes Dive, ChatMCP, Cherry Studio's MCP support discussion, and Claude's Computer Use documentation. It clarifies another part of my product direction: beyond the inference backend, I was investigating how users configure tools, see whether they're available, and view execution results.9100101102

Cherry Studio issue #521 began discussing MCP in late 2024. By March 2025 replies covered SSE/stdio, displaying tool calls, timeouts on long tasks, and configurations marked enabled when the actual service had not started. These were real topics in client development then. Having saved the page does not make other people's particular failures part of my own experience.100

ChatMCP's February 2025 README already listed artifacts and HTML previews and required configuring a model interface and preparing uvx/npx before use. Its Flutter project reminded me other frameworks could implement MCP clients too. My choice of Electron primarily reflected my web development background and integration costs.101

In Claude, an artifact is generated content that can be opened separately. Anthropic described its placement as “a dedicated window alongside their conversation”. For example, Coschool asked Claude to build a word game in which students click letters in a panel beside the chat and can undo mistakes. The game itself is the artifact; the panel runs and displays it. Users can return to the chat to request changes, then try the new version. For how a client identifies content to display separately in a reply, see Developers Digest's video recreating Claude Artifacts, starting at 5:06.103104105

Dive was a close parallel to my memory of “additionally shipping Node/Python.” Its March 2025 README said the Windows build came with both, and the historical Windows packaging configuration did list Node, uv, and Python resources. At least part of this addressed environments for running MCP tools, so it isn't direct evidence of an embedded LLM. README and configuration weren't entirely synchronized: the former said macOS users had to install their own tools, but the latter already listed corresponding macOS resources. I therefore can't infer the contents of every release from documentation alone.9

That makes “configuration-free” at least two separate tasks: running the local model and running local MCP tools that depend on Node/Python. Solving either one may still leave the user setting up the other. This may be another reason I kept investigating separate runtimes and cross-platform packaging, but it is no substitute for PromptPulse's own implementation history.

I also retained Electron's Offscreen Rendering and Performance pages. I recall possibly researching offscreen rendering for a built-in rich-text editor or an artifact-style canvas, but cannot yet tie it to a specific committed implementation.106107

The documented term is offscreen rendering. It lets an application obtain a rendered window image, for example for display elsewhere. It supplies neither a rich-text editing data model nor an offcanvas side drawer. Ordinary rich-text editing or HTML preview does not inherently require offscreen rendering.106

Could I see Blender live beside the chat?

On June 8 I asked how a Dive artifact might display the interface of software operated through MCP, followed by how to capture a Blender window. I wanted PromptPulse users to see what the model had just changed in a scene. At the time Dive's preview component accepted code, displayed HTML or SVG in an embedded page, and could render Mermaid diagrams. To show live changes in local Blender, the client would still need to obtain images from Blender.108109

Two demonstrations by the Blender MCP author sent visual information in different directions. In the first, a reference image went to Claude, which was asked to construct a matching scene in Blender. In another, Claude read scene information from Blender and used Three.js (a browser 3D graphics library) to make a web mockup. That mockup could be displayed as an artifact. If a user then moved an object in Blender, the web view would need to receive the new position to update.110

For viewing the Blender viewport itself, on-demand screenshots were already available. Blender MCP's get_viewport_screenshot merged on the evening of June 8 Beijing time, returning a PNG of the current viewport on each call. The model could move a cube onto a table and take a screenshot so the user could verify its position. A screenshot tool and image in chat suffice for that check. Keeping a panel beside Claude Desktop moving in sync while I drag the Blender view would require continuous capture and transmission. From material available by June 8, 2025, I can confirm interactive artifact previews and on-demand Blender screenshots, with no basis for claiming Claude Desktop then included live streaming of Blender's viewport.111103

From invoking tools to operating software

I recall browsing Claude's Computer Use documentation, probably to explore extending the client further. Beyond chatting and calling tools, I wanted a model to see an application's interface, propose clicks or typing, and continue based on the resulting screen. This fits the same direction as Puppeteer, capturing application views, and artifact display: let the model act and let the user see what it did in the client.108102

Computer Use gave a basic interaction model. The model proposes an action from a screen image, the application executes it in a controlled environment, then returns a screenshot or other result for the next decision. MCP can provide a tool interface and messaging, while an artifact can present content. Computer Use does not depend on MCP, and displaying an application's image does not establish control of it. For PromptPulse this was a possible extension I researched. Its Puppeteer integration at the time was not a general desktop automation agent.5102

What I took away from development

Electron fit my background and desktop-first goal. It let me put together a UI, local services, and MCP interactions relatively quickly, while bringing runtime, model file, and native dependency distribution problems into sharp focus.

To pursue “download and use” again, I'd test the complete installer with a tiny model much earlier. In an environment without developer tools, system Node, or preloaded models, run through installation, loading, generation, and shutdown, then verify each platform separately. That would expose earlier the actual runtime necessary to deliver the product promise.

The successful separate runtime experiment can now be traced to the sidecar project's code and streaming debugging records. Still to explain are the exact trigger of the May crash and the real relationship between my rich-text/artifact exploration and offscreen rendering. My goal went beyond getting a model to answer on my own computer. I wanted someone else to receive the app and have fewer setup steps too.

Fengxi AI Companion's marketing claims and promotion

The sales points advertised for Fengxi AI Companion were close to my ideas for PromptPulse. I also wanted an all-purpose client where a user could discuss something and then get to work on it in the same place. For example, the author showed using large models to generate Word documents and Excel spreadsheets in a video.112 Those are useful product design examples. I don't know which claims Fengxi fully delivered and which may have been promotional.

Fengxi's local deployment still looked somewhat cumbersome. I wanted PromptPulse to make this step easier by packaging the model and runtime together wherever possible, so a user could start their first local conversation immediately after installation.

Fengxi's promotion was worth studying too. Its author posted release introductions on CSDN explaining what new features could do, with a download area on their profile.113 If I promote PromptPulse someday, I'd like to write a CSDN tutorial from installation to the first local conversation, linking the corresponding release so readers can try it as soon as they finish.

References and search entries saved at the time

Footnotes

  1. CaiBorui [S2thend]. (2025). PromptPulse [Source repository]. GitHub. https://github.com/S2thend/PromptPulse. Creation time comes from GitHub metadata. The first five commits were verified in local Git and correspond to the article links. Checked November 17, 2026. ↩ ↩2

  2. CaiBorui. (2025, May 29). Node-Sidecar-Electron [local Git repository, commit 7f85e0d827586840a7c11039d93cff14b618fafb]. src/index.js launches a separate Node process and Express backend. src/backend/express.js loads the Qwen3 ONNX model and streams text. forge.config.js configures extra copies of the runtime, models, and dependencies. The surviving Linux package directory includes resources/node-linux/bin/node. Code quoted from the original local copy. Product files alone do not date their creation or verify results on all platforms. ↩ ↩2

  3. CaiBorui. (2025, May 29). Express Server Undefined Request Body Issue [private Cursor conversation retained by the author]. Session created May 28; cited exchange took place May 29 in nodejs-sidecar-electron. At about 08:48 I reported receiving the first text segment but failing to parse it. Around 08:55 I pasted successive generated text and confirmed the fix. Times follow adjacent replies. My November 17, 2026 recollection also says the sidecar ran successfully, working around the Electron memory-related limit encountered then. ↩ ↩2

  4. nihaal007. (2024, August 21). Nikolas Tesla. Open WebUI Community. See the opening paragraph of “System prompt” and the first item under “As Tesla, you will.” ↩

  5. CaiBorui [S2thend]. (2025, March 8). PromptPulse [Historical source snapshot, 716bb32]. GitHub. https://github.com/S2thend/PromptPulse/tree/716bb32dcea4a3806bef388462c825e3c091b734. For later features and packaging see the June 8, 2025 snapshot and commit moving SQLite data to the user directory. ↩ ↩2 ↩3 ↩4 ↩5

  6. CaiBorui [S2thend]. (2025, March 17). Add chat history feature [commit 925a9b7 and historical code]. GitHub. https://github.com/S2thend/PromptPulse/commit/925a9b70efe6b9f84812e9cb8fa4a038a9b37395 . In that version sqlite_utils/index.js contains SQLite tables and persistence logic; saveChatHistory() in json_db_utils/index.js writes messages and session information to a JSON file under the user directory. ↩ ↩2 ↩3

  7. Karenina-na et al. (n.d.). Claude-Desktop [README and routes, historical snapshot 85cb591]. GitHub. Original entries: https://github.com/Karenina-na/Claude-Desktop ; https://github.com/Karenina-na/Claude-Desktop/blob/master/src/router/index.ts . Verified README and src/router/index.ts. The author recalls using claude desktop opensource to find open-source clients and read source. Exact date and viewed commit are unknown. The fixed snapshot verifies implementation already available then. Access date: June 8, 2025 (historical cutoff). ↩

  8. litongjava. (n.d.). tauri-claude [tauri.conf.json, snapshot effb127, windows configuration]. GitHub. Original entry: https://github.com/litongjava/tauri-claude ; window configuration. The snapshot illustrates wrapping a web page, without establishing adoption of Tauri by PromptPulse. Access date: June 8, 2025 (historical cutoff). ↩

  9. OpenAgentPlatform contributors. (2025, March 24). Dive [Source snapshot]. Original link: https://github.com/OpenAgentPlatform/Dive. Additional source link supplied by author: https://github.com/OpenAgentPlatform/Dive/tree/main/. Historical comparison at 5da5ab6: README, electron-builder.json, Python download script. System requirements in the README differ from packaging configuration in the same snapshot. The article describes the visible files without inferring actual dependencies of every distribution. The date identifies the selected snapshot, not my visit. ↩ ↩2 ↩3

  10. Hugging Face. (n.d.). Chat UI. Hugging Face Docs. See the opening description of the online instance and the Ollama configuration under “Quickstart.” Online instance: Hugging Face. (n.d.). HuggingChat. ↩

  11. Electron Forge contributors. (n.d.). React [“Integrate React code”]. Electron Forge documentation. Access date: February 27, 2025. https://www.electronforge.io/guides/framework-integration/react 。 ↩

  12. React contributors. (n.d.). Add React to an Existing Project, “Using React for a part of your existing page.” React. Rendering a React component in an existing page. Firefox records navigating here from the Electron Forge guide at 03:22 on February 27, 2025. ↩

  13. CaiBorui. (2025, March 2). Creating and Integrating a React App; Changing Base URL in Remix Router [private Cursor conversations retained by author, electron_play workspace, outside the PromptPulse repository]. Adjacent assistant replies about React integration, static assets, IPC, and base URL occurred around 02:30, 02:58, 03:03, and 03:49 Beijing time. User messages have no separate timestamps. Build resource paths, adding ., and ineffective homepage were discussed about 02:45–03:18. The reply about React using window for communication was around 03:04. IPC and asset-path accounts are now in separate articles. On November 18, 2026 the author added that hydration, lazy loading, and related framework research predated PromptPulse; migration options were revisited for this project. For migration tutorials and the asset-path exchange see the separate article. ↩

  14. CaiBorui [S2thend]. (2025, March 4). PromptPulse [commit 32c04f1, main.js, preload.js, and Vite configuration]. GitHub. web/src/main.jsx, desktop/main.js, desktop/preload.js, and web/vite.config.js cover local page loading, base: "./", the contextBridge interface, and invoke/handle calls. The set-title handler invokes restartOnNewPort and returns the constant "default" without awaiting a completed restart, so the IPC result doesn't confirm a successful service restart. For build configuration and early investigation, see the separate article. ↩ ↩2

  15. CaiBorui. (2025, March 3). Setting Up Express Server in Electron [private Cursor discussion retained by author, electron_play workspace]. Session 515ee280-9e6b-4917-aba8-563b7379e2e8 started March 2. Responses to questions on startup/shutdown, port changes, and error handling occurred on March 3 around 03:59, 04:09, and 04:12 Beijing time, without separate user timestamps. Implementation: CaiBorui [S2thend]. (2025, March 4). PromptPulse [commit 32c04f1, express_server/index.js]. GitHub. https://github.com/S2thend/PromptPulse/blob/32c04f1b6183ab6d4c0121e96e237f522678987a/desktop/express_server/index.js . The code closes then listens again, without establishing that every error path was tested. ↩ ↩2

  16. Austin. (2019, June 30). Starting and stopping node app from inside Electron app [question and July 1, 2019 comment on forking/terminating a child process]. Stack Overflow. https://stackoverflow.com/questions/56827471/starting-and-stopping-node-app-from-inside-electron-app ; Hightower, T. (2019, June 30). Answer to “Starting and stopping node app from inside Electron app”. Stack Overflow. https://stackoverflow.com/a/56827606 . Access date: June 8, 2025 (historical cutoff). Page and comments checked November 18, 2026. The questioner's use of a child process is not presented as my implementation. ↩

  17. Tailwind Labs. (n.d.). Hover, focus, and other states. https://tailwindcss.com/docs/hover-focus-and-other-states ; Responsive design. https://tailwindcss.com/docs/responsive-design ; Installing Tailwind CSS with Vite. https://tailwindcss.com/docs/installation/using-vite ; Install Tailwind CSS with React Router. https://tailwindcss.com/docs/installation/framework-guides/react-router . Access date: June 8, 2025 (historical cutoff). Author-supplied browsing material checked November 18, 2026. Historical implementation follows note 83's code, not the current docs version. General styling materials might also have been used for other projects. Exact visit dates unknown. ↩ ↩2

  18. CaiBorui [S2thend]. (2025, March 4–8). PromptPulse [Tailwind settings and UI code]. GitHub. March 4 commit 32c04f1: web/package.json, web/vite.config.js, web/src/App.css, and web/src/App.jsx. March 8 commit 716bb32: chat bubble breakpoint styles. The early manifest declared both tailwindcss and @tailwindcss/vite as ^4.0.9, a range rather than an exact installation. ↩ ↩2 ↩3

  19. CaiBorui. (2025, March 2–6). Tailwind CSS Input Form Design; Adding a Chat Bot UI with Tailwind CSS [private Cursor conversations retained by author]. Both sessions belonged to electron_play, with IDs fbf77455-a292-4649-b4d2-a7ea6c3c349f and f76208b1-2a3b-464d-b130-8d992d4e704a. Assistant replies about the input form occurred March 2 around 17:45–18:23 Beijing time; chat UI replies occurred March 6 around 19:45–20:55. User messages have no independent timestamps. The text describes layout and styling requirements, without treating suggestions as verified fixes. ↩

  20. Electron contributors. (n.d.). Application Distribution. Electron documentation. Access date: June 8, 2025 (historical cutoff). https://www.electronjs.org/docs/latest/tutorial/distribution-overview 。 ↩

  21. Electron Forge contributors. (n.d.). CLI, “Make” section. Access date: June 8, 2025 (historical cutoff). https://www.electronforge.io/cli#make 。 ↩

  22. Electron Forge contributors. (n.d.). CLI, “Publish” section. Access date: June 8, 2025 (historical cutoff). https://www.electronforge.io/cli#publish 。 ↩

  23. Electron Forge contributors. (n.d.). Makers. Access date: June 8, 2025 (historical cutoff). https://www.electronforge.io/config/makers 。 ↩

  24. Electron contributors. (n.d.). WebPreferences Object. Electron documentation. Access date: June 8, 2025 (historical cutoff). https://www.electronjs.org/docs/latest/api/structures/web-preferences 。 ↩

  25. Electron contributors. (n.d.). Custom Title Bar. Electron documentation [Saved original documentation link]. https://www.electronjs.org/docs/latest/tutorial/custom-title-bar. ↩

  26. Polattimur, O. (2020, May 21). Electron Frameless Window Close and Minimize to Tray. Medium. https://medium.com/@onur.polattimur/electron-frameless-window-close-and-minimize-to-tray-5bab47f66f82 。 ↩

  27. Google. (n.d.). electron customize close maxmize button [Saved search, original spelling; date not recovered]. https://www.google.com/search?q=electron+customize+close+maxmize+button&oq=electron+customize+close+maxmize+button&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIJCAEQIRgKGKAB0gEJMjA0NTZqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8. ↩

  28. CaiBorui. (2025, March 6–17). Development conversations with Cursor about model packaging, Forge directories, IPC and SSE [Unpublished records retained by the author]. Quotes come from model packaging on March 6 and production package and Forge configuration troubleshooting on March 14. The SSE issue dates to March 17. A local Git stash 0acfb97 saved March 14 at 05:44:47 is additional evidence of an attempt, not a verified fix. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7

  29. node-llama-cpp contributors. (n.d.). node-llama-cpp [repository]. GitHub. https://github.com/withcatai/node-llama-cpp ; Getting Started: Getting a Model File. https://node-llama-cpp.withcat.ai/guide/#getting-a-model-file ; Downloading Models. https://node-llama-cpp.withcat.ai/guide/downloading-models . Access date: June 8, 2025 (historical cutoff). The author supplied the search term run gguf model with node js, followed by visits to the repository and guides. Content checked against v3.6.0's Getting Started and Downloading Models. ↩

  30. node-llama-cpp contributors. (n.d.). Choosing a Model. https://node-llama-cpp.withcat.ai/guide/choosing-a-model . Choosing a File to Get discusses file selection. Access date: June 8, 2025 (historical cutoff). Quantization guidance checked against v3.6.0. The recommendation is consistent with the project filename; this doesn't establish it was the sole basis of selection. ↩ ↩2

  31. CaiBorui [S2thend]. (2025, March 6). PromptPulse: added node llama [commit 8f21e00, llm_utils/index.js]. GitHub. https://github.com/S2thend/PromptPulse/blob/8f21e000797dd2449b659e49834d56d1be74fddc/desktop/express_server/llm_utils/index.js . Committed at 19:01:38 Beijing time. Includes model loading, session creation, and three questions, without output records establishing their results. ↩ ↩2 ↩3

  32. node-llama-cpp contributors. (n.d.). Using Embedding; Text Completion. node-llama-cpp documentation. Embedding and Text Completion. Interfaces and uses checked against v3.6.0's embedding.md and text-completion.md. Access date: June 8, 2025 (historical cutoff). ↩

  33. node-llama-cpp contributors. (n.d.). Chat Wrapper, “Background” and “Chat Wrappers.” https://node-llama-cpp.withcat.ai/guide/chat-wrapper . Access date: June 8, 2025 (historical cutoff). Technical description checked against v3.6.0. The early code did not explicitly supply chatWrapper; it does not establish that I implemented a custom template. ↩

  34. CaiBorui. (2025, March 8). Understanding Chat History Management in LlamaChatSession [private Cursor conversation retained by author]. Session e997df21-a19f-447a-bc14-8669387bd5f6 was associated with workspace electron_play. The user's quoted question concerned passing history through prompt; the adjacent assistant reply was around 18:13 Beijing time with no separate user timestamp. See contemporaneous llm_utils/index.js in PromptPulse commit 716bb32. ↩

  35. node-llama-cpp contributors. (n.d.). Using LlamaChatSession, “Simple Chatbot,” “Response Streaming,” “Saving and Restoring a Chat Session,” “Stop Response Generation,” and “Stream Response Segments.” https://node-llama-cpp.withcat.ai/guide/chat-session . Direct links were saved for stopping generation and streaming segments. Access date: June 8, 2025 (historical cutoff). Checked against v3.6.0. Save/restore methods illustrate the distinction between session and persistence without establishing their adoption in the project. Pages in notes 77 and 78 checked November 18, 2026. ↩ ↩2

  36. SurfaceData. (n.d.). local-llama-electron [Electron example application]. GitHub. Firefox records from March 4, 2025 (Beijing time) show a search for node llama cpp multiple files at 17:18:29 and a visit to node-llama-cpp's Electron guide at 17:19:40. At 20:10:41 I searched electron node llama cpp model file and at 20:10:49 opened this example. ↩ ↩2

  37. CaiBorui. (2025, March 4). Bundling Electron Apps: Excluding node-llama-cpp [private Cursor conversation retained by the author]. Session d7ee9725-cabd-4a90-a4b4-decc9f5aebd6 was associated with workspace electron_play. Replies about external, Webpack, and Forge occurred around 17:23, 17:24, and 17:29 Beijing time, without separate user timestamps. The author also supplied search term Marking node-llama-cpp as an external module for electron. The record dates the packaging investigation before the March 6 integration commit. It does not establish completion of those settings. ↩

  38. node-llama-cpp contributors. (n.d.). Using in Electron, version 3.6.0, “Electron Support,” “Cross Compilation,” and “Bundling” sections. GitHub. https://github.com/withcatai/node-llama-cpp/blob/v3.6.0/docs/guide/electron.md. The quotation appears in “Bundling.” Verification used a fixed version. Original browsing link: https://node-llama-cpp.withcat.ai/guide/electron#bundling. Access date: June 8, 2025 (historical cutoff). ↩ ↩2

  39. Electron Forge contributors. (n.d.). Vite Plugin, “Native Node modules” section. Access date: June 8, 2025 (historical cutoff). https://www.electronforge.io/config/plugins/vite#native-node-modules. Reading the page does not show PromptPulse used the Forge Vite plugin. Its web frontend had its own Vite configuration. ↩ ↩2

  40. Electron Forge contributors. (n.d.). Auto Unpack Native Modules Plugin. Access date: June 8, 2025 (historical cutoff). https://www.electronforge.io/config/plugins/auto-unpack-natives 。 ↩ ↩2

  41. Electron Forge contributors. (n.d.). ASAR [Saved site search]. https://www.electronforge.io/?q=asar. Electron contributors. (n.d.). ASAR Archives, “Using ASAR Archives” and “Limitations of the Node API.” Electron documentation. https://www.electronjs.org/docs/latest/tutorial/asar-archives. Both links supplied by the author. Access date: June 8, 2025 (historical cutoff). ↩ ↩2 ↩3

  42. Electron Forge contributors. (n.d.). Build Lifecycle, “Step 1: Package,” “Step 2: Make,” and “Step 3: Publish.” Browsing entry supplied by author: https://www.electronforge.io/core-concepts/build-lifecycle?q=asar ; content checked at the same URL without query parameters: https://www.electronforge.io/core-concepts/build-lifecycle . Access date: June 8, 2025 (historical cutoff). Used to explain responsibilities among build stages. The current page is not a snapshot from that date, evidence of a particular hook, or proof of a packaging fix. ↩

  43. electron-vite contributors. (n.d.). Getting Started. https://electron-vite.org/guide/ ; Building for Production. https://electron-vite.org/guide/build ; Distribution, “Limitations of ASAR Archives” and application distribution. https://electron-vite.org/guide/distribution ; Asset Handling, sections covering resource directories, file paths, and ASAR unpacked paths. https://electron-vite.org/guide/assets . Access date: June 8, 2025 (historical cutoff). Author-supplied browsing material, current pages checked November 18, 2026 to identify relevant issues. Current defaults, APIs, and Node requirements are not projected back onto 2025. ↩

  44. Electron Packager contributors. (n.d.). Options, extraResource. Access date: June 8, 2025 (historical cutoff). https://electron.github.io/packager/main/interfaces/Options.html#extraResource. Explanation of the resource directory added during editing. ↩

  45. hekevintran. (2020, March 24). Can't use static files in electron forge [Question]. Stack Overflow. https://stackoverflow.com/questions/60839621/cant-use-static-files-in-electron-forge. The question illustrates development-server paths differing from production files. An answer for another template is not treated as a verified PromptPulse fix. ↩

  46. CaiBorui. (2026, November 17). Additional research trail on packaging resources [Author recollection; original visit dates unavailable]. Sequence retained: Google, n.d., extraResource: [ "models" ] → extraresources electron forge → Electron Forge contributors, n.d., Configuration Overview, original link with search parameters → Electron Packager Config → Electron Packager contributors, n.d., Options → Options.asar → Schlueter, I. Z., & contributors, n.d., minimatch, Features. The query-parameter configuration URL was inaccessible; the same page without parameters was read. The condition for invalid pattern was verified against assertValidPattern in minimatch v3.1.2 and a local copy of that version. ↩ ↩2 ↩3

  47. Stevens, K., & contributors [SurfaceData]. (2023, December 2). local-llama-electron: forge.config.mjs [Source code]. GitHub. Saved link: https://github.com/SurfaceData/local-llama-electron/blob/main/forge.config.mjs. Fixed snapshot 657ad2f used for historical comparison. The date is the relevant file commit, not my visit. ↩

  48. Electron contributors. (n.d.). Native Node Modules and Native Code and Electron. Electron documentation. Access date: June 8, 2025 (historical cutoff). https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules and https://www.electronjs.org/docs/latest/tutorial/native-code-and-electron. Related Q&A: trd3v3lop. (2021, June 3). cannot use native node module in electron-forge app [Question]. Stack Overflow. https://stackoverflow.com/questions/67824300/cannot-use-native-node-module-in-electron-forge-app. Saved Google searches (n.d., dates unavailable): node llama cpp not packed as native dep, how to mannulay set a native dependency in electron forge. See footnote 22 for the auto-unpack plugin documentation supplied more than once. ↩ ↩2 ↩3

  49. patarapolw. (2021, January 15). Cross compilation guide / support (maybe only relevant for Electron when you don't have all three OS's) [Issue #538]. better-sqlite3, GitHub. https://github.com/WiseLibs/better-sqlite3/issues/538. Build experience: pietersartain. (2021, April 26). Comment. ↩ ↩2

  50. Xallum. (2022, September 30). How to use electron with better-sqlite3? [question]. Stack Overflow. https://stackoverflow.com/questions/73904974/how-to-use-electron-with-better-sqlite3 . Access date: June 8, 2025 (historical cutoff). The author's decisions to downgrade Node and use Python 2 applied to their old project; these are not general installation requirements. ↩

  51. RavenMan. (2016, July 26). Packaged Electron App cannot find module sqlite3 [question; Vadim Macagon's July 27, 2016 answer on excluding node_modules; Jayground's November 22, 2017 answer on afterCopy and electron-rebuild]. Stack Overflow. https://stackoverflow.com/questions/38600940/packaged-electron-app-cannot-find-module-sqlite3?rq=4 . Access date: June 8, 2025 (historical cutoff). That page concerns sqlite3, not better-sqlite3. I retained its troubleshooting ideas about packaging and rebuilding dependencies, without claiming an identical error or successful application of that fix. ↩

  52. Node.js contributors. (n.d.). C++ addons, “Building,” “Loading addons using require(),” “Native abstractions for Node.js,” and “Node-API.” Original entry: https://nodejs.org/api/addons.html . Technical explanation checked against Node.js v22.14.0. Access date: June 8, 2025 (historical cutoff). The author recalls investigating native module building, loading, and compatibility. This doesn't establish that I wrote an addon or verified all cross-platform builds. ↩ ↩2 ↩3 ↩4 ↩5

  53. Electron Forge contributors. (n.d.). AutoUnpackNativesPlugin.ts, version 7.7.0 [Source code]. GitHub. https://github.com/electron/forge/blob/v7.7.0/packages/plugin/auto-unpack-natives/src/AutoUnpackNativesPlugin.ts. In resolveForgeConfig, newUnpack is **/{.**,**}/**/*.node. This describes the historical implementation rather than all versions’ handling of native dependencies. ↩

  54. node-llama-cpp contributors. (n.d.). Building From Source. https://node-llama-cpp.withcat.ai/guide/building-from-source . Access date: June 8, 2025 (historical cutoff). Checked against v3.6.0. For build fallback constraints under Electron see note 35. ↩

  55. node-llama-cpp contributors. (n.d.). Using in Electron and LlamaOptions, build. Original links: https://node-llama-cpp.withcat.ai/guide/electron and https://node-llama-cpp.withcat.ai/api/type-aliases/LlamaOptions#build. Historical defaults verified against getLlama.ts in v3.6.0, specifically the LlamaOptions.build comment and defaultBuildOption and canBuild conditions. Current docs do not stand in for the historical version. ↩

  56. Google. (n.d.). better sqlite3 with electron forge [Search saved by the author]. Access date: June 8, 2025 (historical cutoff). https://www.google.com/search?q=better+sqlite3+with+electron+forge&sca_esv=5ab42de3d1d78b1a&ei=k_HSZ6_zHdLOwt0P5tbmyAU&start=10&sa=N&sstk=Af40H4VDbD4Tbvya_XHlx3o59qyue7WAGSwRM8EmPc_d9W_U4VyEhnsX3M8CM4JOPuEzNfil1XsoEmaWRVt7BqghY42QPoDFvpabLg&ved=2ahUKEwjviKP1p4eMAxVSp7AFHWarGVkQ8tMDegQIBxAE&biw=2494&bih=1321&dpr=1. Also retained: search term electron forge better-sqlite, exact date unknown. ↩ ↩2

  57. RxDB contributors. (n.d.). Node.js database. RxDB. Access date: June 8, 2025 (historical cutoff). https://rxdb.info/nodejs-database.html . A storage-selection resource the author saved. The current page does not establish historical plugin capabilities or versions. ↩ ↩2

  58. CaiBorui [S2thend]. (2025, March 12). PromptPulse: llm log to database mostly done, and refactor llm response to openai api response standard; fix logic error on starting new chat session [commit 320fbfd, title excerpt with spelling corrected]. GitHub. https://github.com/S2thend/PromptPulse/commit/320fbfdffebd7bd4b0c99c56a349451c94b421af . The commit explicitly describes creating a fresh session on every function call and failing to carry history into the next turn. ↩

  59. CaiBorui [S2thend]. (2025, March 16). Remove support for local models with node llama cpp for now, switch to ollama api support [Git commit, e96db8f, title excerpted from commit description]. GitHub. https://github.com/S2thend/PromptPulse/commit/e96db8f6fc81b9ab07103dcaba5419f57afcc653. ↩ ↩2 ↩3

  60. Ollama contributors. (n.d.). Ollama JavaScript Library [Source repository and README]. GitHub. https://github.com/ollama/ollama-js. The Usage, Browser Usage and Streaming responses sections were checked. Later features such as cloud models are not attributed to March. ↩

  61. Ollama. (2024, February 8). OpenAI compatibility, “Usage” and “OpenAI JavaScript library.” Ollama Blog. https://ollama.com/blog/openai-compatibility . Quote from the opening paragraph. Historical reading material supplied by the author, checked November 17, 2026. “More to come” still listed function calling as future work, so this announcement illustrates the compatibility approach only. Notes 57 and 59 document March 2025 tool calling. ↩ ↩2

  62. Ollama contributors. (n.d.). API [native API docs, “Generate a chat completion” and “Conventions / Streaming responses”]. GitHub. https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-chat-completion . Quote from the opening description of the chat endpoint. Original entry supplied by the author and checked November 17, 2026. main changes, and the current file points readers to https://docs.ollama.com/api . Only endpoints and fields corresponding to historical code are used to explain integration. Current additions and other endpoints do not imply historical use. Contemporary search entry: Google. (n.d.). ollama api js respone handle. On November 17, 2026 the author recalled both were likely visited around the same time; exact dates are unknown. ↩ ↩2

  63. CaiBorui [S2thend]. (2025, March 19). PromptPulse MCPChatView [historical code, commit 286488c, model requests and tool-call loop]. GitHub. https://github.com/S2thend/PromptPulse/blob/286488c7819a7f6e8e9dd4ecf005c99c42d41dc5/web/src/views/MCPChatView.jsx . A comment also preserves an example of qwen2.5:1.5b returning puppeteer_navigate targeting Google. That example is separate from the 3B model in the actual request configuration. ↩ ↩2 ↩3 ↩4

  64. OpenAI. (n.d.). Streaming API responses [API documentation, Responses API mode, “Enable streaming”]. OpenAI Developers. https://developers.openai.com/api/docs/guides/streaming-responses?api-mode=responses . Quote from the paragraph describing semantic events. Author-supplied research material checked November 17, 2026. Used to explain streaming reception and UI processing; current Responses event names do not describe PromptPulse's native Ollama protocol in March. ↩

  65. Humboldt. (2023, June 19). Re: ChatGPT’s “Stop Generating” function – how to implement? OpenAI Developer Community, post 6, paragraphs 1–3. ↩

  66. Foxalabs. (2023, November 1). Re: ChatGPT’s “Stop Generating” function – how to implement? OpenAI Developer Community, test observations in post 10 and reply on billing in post 12, paragraph 1. ↩

  67. Model Context Protocol contributors. (n.d.). Architecture overview and Java MCP overview [Documentation links saved by author]. Message exchange, Transport selection, Termination, Java MCP overview. Current architecture page contents cannot establish March 2025 behavior. The Java link returned 404. The original text was requested, and its precise wording is not quoted. The author recalls research in March 2025; the exact original URL has not been recovered. ↩

  68. Model Context Protocol contributors. (2024, November 5). Transports, Lifecycle, and Ping [Protocol revision 2024-11-05]. Historical commit bb8f4b7, already available March 13, 2025: Transports, Lifecycle, Ping. The quotation is from the first sentence of Ping; periodic checks are discussed in “Implementation Considerations.” For changes see Model Context Protocol contributors. (2025, March 26). Key Changes. Saved SDK link: https://github.com/modelcontextprotocol/typescript-sdk?tab=readme-ov-file#http-with-sse. For HTTP+SSE examples see the March 15, 2025 README snapshot 3c0081f. ↩ ↩2 ↩3 ↩4 ↩5 ↩6

  69. CaiBorui. (2026, November 17). Historical search path for model tool-calling materials [visit order supplied by author]. Google search: client.chat.completions.create tools → OpenAI. (n.d.). Text generation → Agents, tools entry → Function calling (visited twice consecutively). These are historical leads, rather than a reconstruction from current Google results. Documents checked November 17, 2026; local Chrome records for 15:08–15:09 that day are revisits, not evidence of the first reading date. Attribution to the project uses search terms and PromptPulse's March Chat Completions tool calls, independently of current redirect URLs or default API mode. ↩

  70. DAIR.AI. (n.d.). Function Calling with LLMs. Prompt Engineering Guide. London weather request, model arguments, and querying the service in “Function Calling with GPT-4”. ↩

  71. Ollama. (n.d.). Tools models [model filter saved by the author]. Access date: June 8, 2025 (historical cutoff). https://ollama.com/search?c=tools . The list changes. The limited choice at the time is my recollection; I did not reconstruct a historical count from today's list. ↩

  72. OpenAI. (n.d.). Chat. OpenAI API Reference. See Chat Completions tool definitions and tool calls in assistant messages. ↩

  73. CaiBorui [S2thend]. (2025, March 19). PromptPulse [source code]. GitHub. Code in MCPChatView.jsx carrying tool results into the next turn's messages. ↩ ↩2 ↩3

  74. CaiBorui [S2thend]. (2025, March 19–22). PromptPulse [source code]. GitHub. March 19 math example comment, web examples, and request body, and system prompt extracted March 22. ↩ ↩2 ↩3 ↩4

  75. sfsean & _j. (2023, June 17). Re: Function Calling very unreliable. OpenAI Developer Community. sfsean's example response in post 15; quotation from _j, post 2, paragraph 2. ↩

  76. t.haferlach. (2023, June 17). Re: Function Calling very unreliable. OpenAI Developer Community. Post 3 asking how to write example calls and post 6 on duplicating function definitions. ↩

  77. merefield. (2025, February 19). Re: Prompting Best Practices for Tool Use (Function Calling) [reply to jschaenzle, post 3]. OpenAI Developer Community. Reply on emphasizing particular functions in a prompt. Local history shows the article in note 98 opened first at 05:25 on March 19, 2025 and this post about eight seconds later (Beijing time). ↩

  78. The LangChain Team. (2024, July 24). Few-shot prompting to improve tool-calling performance. LangChain. Corrective exchange in “Constructing the few-shot dataset” under “Multiverse Math”. Browsing entry used at the time. ↩

  79. sfsean. (2023, June 17). Re: Function Calling very unreliable. OpenAI Developer Community. Post 19, reply containing both prose and a news request. ↩

  80. Chen, M. (2024, March 8). State of “Function Calling” in LLM. Medium. “1. Function Calling with OpenAI Python Client,” code in run_conversation storing the model reply and individual tool results. ↩

  81. t.haferlach. (2023, June 17). Re: Function Calling very unreliable. OpenAI Developer Community. Post 18, author's comment below the quotation about message history. ↩

  82. CaiBorui [S2thend]. (2025, March 19–23). PromptPulse MCP client and connection management changes [Git commits]. GitHub. March 19 server code, March 19 frontend connection code, March 23 disconnect and state handling. See also CaiBorui. (2025, March 27). Understanding JSON-RPC Schemas and Types [Unpublished Cursor development conversation retained by the author]. Pasting the SDK schema that evening and asking about JSON-RPC did not establish that a periodic heartbeat was implemented. ↩ ↩2 ↩3 ↩4

  83. Ollama. (2024, July 25). Tool support, “Tool calling” and “OpenAI compatibility.” Ollama Blog. https://ollama.com/blog/tool-support ↩

  84. OpenAI. (n.d.). Structured model outputs [API documentation, “When to use Structured Outputs via function calling vs via text.format” and “Structured Outputs vs JSON mode”]. OpenAI Developers. https://developers.openai.com/api/docs/guides/structured-outputs?api-mode=responses . Quote from the latter section's first paragraph. Author-supplied material checked November 17, 2026. Inspected PromptPulse and coding-agent prototype code contained no explicit use of response_format or json_schema. The text distinguishes research from argument handling and does not claim a Structured Outputs integration. ↩ ↩2

  85. jutextile6 & sps. (2024, August 23–24). The failure rate of function calls of gpt-4o-mini is increasing. OpenAI Developer Community. Self-reported results in post 1, order query in post 2, and strict mode reply in post 3. See also OpenAI. (2024, August 6). Introducing Structured Outputs in the API, “How to use Structured Outputs”. ↩

  86. bunder2015. (2024, May 21). Re: Function calling results in bad state for all LLM models (Issue #2293). GitHub. Tool definitions and terminal output in a C++ chat client: compare the requirements field in both code blocks. ↩

  87. lenaxia. (2024, May 12–21). Function calling results in bad state for all LLM models (Issue #2293). GitHub. “Describe the bug” in the initial report and the author's note before closing. ↩

  88. CaiBorui [S2thend]. (2025, March 22). PromptPulse. GitHub. strict in tool definitions and request sent to Ollama. ↩

  89. Schmid, P. (2025, January 17). How to use Anthropic MCP Server with open LLMs, OpenAI or Google Gemini [Example integrating an LLM with MCP tools]. Philipp Schmid. Access date: June 8, 2025 (historical cutoff). https://www.philschmid.de/mcp-example-llama ↩ ↩2

  90. Model Context Protocol contributors. (2025, March 15). SSEServerTransport [TypeScript SDK source, historical snapshot 3c0081f]. GitHub. https://github.com/modelcontextprotocol/typescript-sdk/blob/3c0081f2ecd8bb9b117330783ad25c2ec127ef60/src/server/sse.ts. The saved main-branch link was inaccessible. The article uses the historical start(), handlePostMessage() and send() to explain the message path. ↩ ↩2

  91. CaiBorui. (2026, November 17). Recollection of reading MCP source and working with Cursor [author's note]. I actively sought official source and examples to guide Cursor's changes to MCP calls more precisely and verify implementation details. ↩

  92. Model Context Protocol contributors. (2025, March). MCP Inspector [Developer tool and source code]. Original repository: https://github.com/modelcontextprotocol/inspector. Historical README, ec73831. Code comparison: March 17, 2025 useConnection.ts, dd460bd. Also retained: Google (n.d.), @modelcontextprotocol/inspector search. Query parameters are not used to infer a visit date. ↩ ↩2

  93. Model Context Protocol contributors. (2025, March 15). useConnection [Inspector snapshot cedf02d, lines 3 and 233–249]. GitHub. https://github.com/modelcontextprotocol/inspector/blob/cedf02d1520daf5680ee9b7af785feccafa8be5b/client/src/lib/hooks/useConnection.ts#L233 . Original browsing entries: main, line 3 and main, line 233. ↩ ↩2

  94. CaiBorui [S2thend]. (2025, April 3). Integrating litemcpjs into PromptPulse [Git commits, Beijing time]. GitHub. Frontend migration ec8c6c2, backend migration daa0c72. ↩

  95. CaiBorui [S2thend]. (2025, March–April). Lite MCP SDK [Source repository]. GitHub. https://github.com/S2thend/Lite_MCP_sdk. The first commit 26a58e5 contained only LICENSE. Another local copy preserved commit 527624ae653c68e8594e82d10007011a562c2f2e on March 29 at 15:39:36 with the message “finish js client sdk.” The evening commit 3026728 on March 29 contained SDK and tests; see test/test.js and server.js in that commit. For PromptPulse integration see the April 3, 2025 commit ec8c6c2. The project attribution of the March 27 “Understanding JSON-RPC Schemas and Types” and March 29 “SSE Client Transport Error Analysis” conversations was checked against retained Cursor workspaces: MCP_Lite and MCP_Lite/Lite_MCP_sdk respectively. ↩ ↩2

  96. Model Context Protocol contributors. (2025, March 26). Transports [protocol version 2025-03-26, “Streamable HTTP”]. Model Context Protocol. https://modelcontextprotocol.io/specification/2025-03-26/basic/transports ↩

  97. Google. (n.d.). node llama cpp ggml_vulkan: Requested buffer size exceed [Saved search; date not recovered]. https://www.google.com/search?q=node+llama+cpp+ggml_vulkan%3A+Requested+buffer+size+exceed&sca_esv=8b96870286fb2787&ei=d-vGZ9nnKtngp84P4fDjgQE&ved=0ahUKEwiZ_8yzsPCLAxVZ8MkDHWH4OBAQ4dUDCBA&uact=5&oq=node+llama+cpp+ggml_vulkan%3A+Requested+buffer+size+exceed&gs_lp=Egxnd3Mtd2l6LXNlcnAiOG5vZGUgbGxhbWEgY3BwIGdnbWxfdnVsa2FuOiBSZXF1ZXN0ZWQgYnVmZmVyIHNpemUgZXhjZWVkMggQABiABBiiBDIFEAAY7wUyCBAAGIAEGKIEMggQABiABBiiBDIIEAAYgAQYogRIlDZQ9AtY6zRwAXgBkAEAmAGuB6ABkiiqAQkzLTkuMC4yLjG4AQPIAQD4AQGYAiagArx8qAIEwgIKEAAYsAMY1gQYR5gDAIgGAZAGAZIHBTEuMy0zoAf-Kw&sclient=gws-wiz-serp. ↩

  98. CaiBorui. (2026, November 17). Additional original node-llama-cpp Vulkan error [Log excerpt supplied by the author]. The original includes Requested buffer size exceeds device memory allocation limit: ErrorOutOfDeviceMemory and failed to allocate Vulkan0 buffer of size 6595743744. This date is when I supplied the excerpt, not the date of failure. Only line breaks have changed in the article. ↩ ↩2

  99. dazipe. (2025, February 2). Misc. bug: Vulcan premature out of memory exception on AMD Instinct MI60 [Issue #11598]. llama.cpp, GitHub. https://github.com/ggml-org/llama.cpp/issues/11598. See the February 2, 2025 comment about the historical single-buffer limit. Added during editing, not evidence of my reading the issue at the time. ↩

  100. jinlm. (2024, December 23). [Feature]: Support MCP [Issue #521]. Cherry Studio, GitHub. https://github.com/CherryHQ/cherry-studio/issues/521. Discussion includes duanhongyi. (2025, March 6). Suggestion on long-task timeouts; vaayne. (2025, March 7). Explanation of stdio/SSE and displaying calls; vaayne. (2025, March 13). Reply on service state and environment configuration. These were participant reports; I did not independently verify each release. ↩ ↩2

  101. daodao97 & contributors. (2025, February 23). ChatMCP [Source snapshot]. Original link: https://github.com/daodao97/chatmcp. Historical comparison: README, 68e045e, including “Artifact generation and review,” “HTML Code Preview” and Usage. pubspec.yaml from the same revision confirms Flutter dependencies. The date identifies the snapshot, not my visit. ↩ ↩2

  102. Anthropic. (n.d.). Computer use tool. Claude Platform Docs. Access date: June 8, 2025 (historical cutoff). https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool. Used only to explain the application action/result loop, without attributing current API names, models or version requirements to 2025. Also retained: Google (n.d.), computer use search. ↩ ↩2 ↩3

  103. Anthropic. (2024, June). Claude 3.5 Sonnet. Anthropic. Quotation from the opening of “Artifacts—a new way to use Claude.” ↩ ↩2

  104. Coschool. (2024, December 10). Claude AI Artifacts: The future of interactive and personalised education. The Prompt Lab, Medium. See “How to create a Word Construction Game?” under “Real-world applications of Claude Artifacts.” ↩

  105. Developers Digest. (2024, November 27). Recreating Anthropic’s Claude Artifacts Feature – Part 1 [Video]. YouTube. See “Artifact Detection and Handling,” starting at 05:06. ↩

  106. Electron contributors. (n.d.). Offscreen Rendering, “Overview” section. Electron documentation. Access date: June 8, 2025 (historical cutoff). https://www.electronjs.org/docs/latest/tutorial/offscreen-rendering 。 ↩ ↩2

  107. Electron contributors. (n.d.). Performance. Electron documentation. Access date: June 8, 2025 (historical cutoff). https://www.electronjs.org/docs/latest/tutorial/performance. Retained as historical performance reading, not evidence of a completed optimization. ↩

  108. CaiBorui. (2025, June 8). Implementing artifact feature in dive ai mcp client [Unpublished Cursor development conversation retained by the author]. Covers software interfaces in artifacts, Blender views and window screenshots. My November 17, 2026 recollection adds that offscreen rendering research may have related to rich-text editing or an artifact canvas. ↩ ↩2

  109. OpenAgentPlatform contributors. (2025, May 29). Dive [Source code, commit bbe0e32]. GitHub. See formats supported by the preview component and content sources for embedded pages. ↩

  110. ahujasid. (2025, March 11). Blender MCP Demo: Using a reference image [Video]. YouTube. The project’s June 2025 README lists reference-image modeling and a demo reading a scene and creating a Three.js sketch. ↩

  111. Blender MCP contributors. (2025, June 8). Merge branch 'screenshot-feature' [Merge commit]. GitHub. The tool implementation retrieves one PNG on request. The merge was at 22:04 Beijing time. I could not determine which version I investigated that day. ↩

  112. Fengxi AI Companion. (2025, March 1). Generating PDFs, Word Documents, Excel Spreadsheets, and More with DeepSeek and Other Large Models [video]. Bilibili. https://www.bilibili.com/video/BV1wfXXYfEBW/ . This and the following reference were added during retrospective review on November 20, 2026. ↩

  113. Ling Tian Xiang Long. (2025, November 22). Fengxi AI Companion V1.2.0.0 released: more stable, more powerful, and bringing AI within reach. CSDN Agent Developer Community. https://adg.csdn.net/69708ee8437a6b40336ab46f.html . ↩

© 2025 borui. All rights reserved. This content may be freely reproduced, displayed, modified, or distributed with proper attribution to borui and a link to the article: borui (2025-03-04). PromptPulse Development Notes: Choosing Electron and Packaging Local Models. https://caiborui.com/blog/2025-03-04-zh-promptpulse-development-notes-entrans

@misc{borui2025-715f002c,
  author = {borui},
  title = {{PromptPulse Development Notes: Choosing Electron and Packaging Local Models}},
  year = {2025},
  publisher = {borui's blog},
  url = {https://caiborui.com/blog/2025-03-04-zh-promptpulse-development-notes-entrans}
}