mindweave 2.4.9 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +145 -144
- package/dist/cli/App.js +47 -8
- package/dist/cli/App.js.map +1 -1
- package/dist/cli/commandArgs.js +7 -1
- package/dist/cli/commandArgs.js.map +1 -1
- package/dist/cli/commands.js +1 -0
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/components/ApprovalBox.js +10 -1
- package/dist/cli/components/ApprovalBox.js.map +1 -1
- package/dist/cli/components/McpMinitabs.js +1 -1
- package/dist/cli/components/Picker.js +1 -1
- package/dist/cli/components/Picker.js.map +1 -1
- package/dist/cli/components/ToolLine.js +1 -1
- package/dist/cli/components/ToolLine.js.map +1 -1
- package/dist/cli/feedback.js +223 -0
- package/dist/cli/feedback.js.map +1 -0
- package/dist/cli/framebuffer/writer.js +1 -1
- package/dist/cli/toolDisplay.js +4 -3
- package/dist/cli/toolDisplay.js.map +1 -1
- package/dist/core/turnRunner.js +366 -0
- package/dist/core/turnRunner.js.map +1 -0
- package/dist/drivers/anthropic/client.js +77 -21
- package/dist/drivers/anthropic/client.js.map +1 -1
- package/dist/drivers/anthropic/manifest.js +28 -11
- package/dist/drivers/anthropic/manifest.js.map +1 -1
- package/dist/drivers/cerebras/manifest.js +7 -1
- package/dist/drivers/cerebras/manifest.js.map +1 -1
- package/dist/drivers/deepseek/manifest.js +12 -31
- package/dist/drivers/deepseek/manifest.js.map +1 -1
- package/dist/drivers/glm/manifest.js +18 -5
- package/dist/drivers/glm/manifest.js.map +1 -1
- package/dist/drivers/kimi/manifest.js +13 -10
- package/dist/drivers/kimi/manifest.js.map +1 -1
- package/dist/drivers/meta/manifest.js +21 -16
- package/dist/drivers/meta/manifest.js.map +1 -1
- package/dist/drivers/minimax/manifest.js +15 -12
- package/dist/drivers/minimax/manifest.js.map +1 -1
- package/dist/drivers/openai/manifest.js +24 -7
- package/dist/drivers/openai/manifest.js.map +1 -1
- package/dist/drivers/qwen/manifest.js +19 -6
- package/dist/drivers/qwen/manifest.js.map +1 -1
- package/dist/drivers/xai/client.js +12 -10
- package/dist/drivers/xai/client.js.map +1 -1
- package/dist/drivers/xai/manifest.js +62 -25
- package/dist/drivers/xai/manifest.js.map +1 -1
- package/dist/dynamo/engine.js +179 -99
- package/dist/dynamo/engine.js.map +1 -1
- package/dist/governor/skills.js +1 -1
- package/dist/governor/write.js +61 -0
- package/dist/governor/write.js.map +1 -1
- package/dist/mcp/configWrite.js +1 -1
- package/dist/memory/compaction.js +10 -2
- package/dist/memory/compaction.js.map +1 -1
- package/dist/memory/store.js +8 -1
- package/dist/memory/store.js.map +1 -1
- package/dist/tools/backgroundShells.js +4 -3
- package/dist/tools/backgroundShells.js.map +1 -1
- package/dist/tools/deferredNative.js +13 -4
- package/dist/tools/deferredNative.js.map +1 -1
- package/dist/tools/detail.js +9 -6
- package/dist/tools/detail.js.map +1 -1
- package/dist/tools/edit.js +2 -1
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/governorTools.js +113 -9
- package/dist/tools/governorTools.js.map +1 -1
- package/dist/tools/mcpAdd.js +87 -4
- package/dist/tools/mcpAdd.js.map +1 -1
- package/dist/tools/mcpSearch.js +5 -4
- package/dist/tools/mcpSearch.js.map +1 -1
- package/dist/tools/mindweaveStatus.js +113 -0
- package/dist/tools/mindweaveStatus.js.map +1 -0
- package/dist/tools/nativeStderr.js +27 -0
- package/dist/tools/nativeStderr.js.map +1 -0
- package/dist/tools/registry.js +6 -4
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/replaceSymbol.js +2 -1
- package/dist/tools/replaceSymbol.js.map +1 -1
- package/dist/tools/runCommand.js +59 -21
- package/dist/tools/runCommand.js.map +1 -1
- package/dist/tools/screenshot.js +17 -4
- package/dist/tools/screenshot.js.map +1 -1
- package/dist/tools/todo.js +5 -5
- package/dist/tools/todo.js.map +1 -1
- package/dist/tools/writeFile.js +2 -1
- package/dist/tools/writeFile.js.map +1 -1
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,144 +1,145 @@
|
|
|
1
|
-
<h1 align="center">Mindweave (mwcode)</h1>
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
A fast, model-adaptive, terminal-native AI coding agent.<br>
|
|
5
|
-
You bring your own key. It runs on your machine. Nothing goes anywhere else.
|
|
6
|
-
</p>
|
|
7
|
-
|
|
8
|
-
<p align="center">
|
|
9
|
-
<a href="LICENSE">Apache 2.0</a> •
|
|
10
|
-
<a href="https://x.com/mindweavecli">X</a> •
|
|
11
|
-
<a href="https://mindweavedev.netlify.app/">Website</a>
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## What it is
|
|
17
|
-
|
|
18
|
-
Mindweave is a coding agent that lives in your terminal and works inside your repository:
|
|
19
|
-
reading, searching, editing, running commands, and checking its own work.
|
|
20
|
-
|
|
21
|
-
It runs entirely on your machine. There is no backend, no telemetry and no account. Your
|
|
22
|
-
code and your API key never reach a Mindweave server, because there isn't one.
|
|
23
|
-
|
|
24
|
-
It is built lean on purpose. Most of a coding agent's context budget goes on scaffolding
|
|
25
|
-
the model never needed. Mindweave keeps prompts thin and leaves the room for the model to
|
|
26
|
-
reason about your code.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## Mindweave 1
|
|
30
|
-
|
|
31
|
-
Mindweave 1 is out, tagged `mindweave-1`. It is on npm, and the website is up. Install
|
|
32
|
-
with the steps below.
|
|
33
|
-
|
|
34
|
-
What landed in it is in the [changelog](CHANGELOG.md): fourteen model providers, a
|
|
35
|
-
rebuilt terminal interface, reworked prompt caching and token accounting, project notes
|
|
36
|
-
the agent maintains across sessions, and a long list of things that were quietly wrong.
|
|
37
|
-
|
|
38
|
-
## Install
|
|
39
|
-
|
|
40
|
-
Requires **Windows** and **Node.js 20+**. macOS and Linux are not supported yet, and the
|
|
41
|
-
reason is written down in [KNOWN-ISSUES.md](KNOWN-ISSUES.md) rather than glossed over.
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
npm install -g mindweave
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Then, in any project:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
cd your-project
|
|
51
|
-
mindweave # or mw, for short
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
To build from source instead — for development, or to run an unreleased change:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
git clone https://github.com/mindweave-cli/Mindweave
|
|
58
|
-
cd Mindweave
|
|
59
|
-
npm install
|
|
60
|
-
npm run build
|
|
61
|
-
npm link # makes the `mindweave` command available globally
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
It asks for an API key on first launch and saves it to `~/.mindweave/.env`, so every
|
|
65
|
-
project afterwards just works. `mindweave --help` covers the launch flags; everything
|
|
66
|
-
else is configured inside a session.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## What it can do
|
|
70
|
-
|
|
71
|
-
Short version, one line each. The depth is in the linked pages.
|
|
72
|
-
|
|
73
|
-
- **15 providers,
|
|
74
|
-
Mistral, Groq, Cerebras, Qwen, Kimi, GLM, Meta, MiniMax, Tencent, plus every
|
|
75
|
-
tool-capable model on OpenRouter. Only the driver you
|
|
76
|
-
use is loaded. Switch with `/provider` and `/model`; remembered per project.
|
|
77
|
-
[PROVIDERS.md](src/drivers/PROVIDERS.md)
|
|
78
|
-
- **Real tools** — read and edit files, multi-file edits, ripgrep search, a shell with
|
|
79
|
-
background jobs, and sub-agents. Every edit comes back with the language server's own
|
|
80
|
-
errors for that file. Read-before-edit is enforced, and `/undo` is a real net.
|
|
81
|
-
- **Deterministic code intelligence** — a background lane indexes your repo with
|
|
82
|
-
tree-sitter and language servers, costing no tokens, so the agent understands the
|
|
83
|
-
codebase, not just the open file.
|
|
84
|
-
- **Session memory** — automatic compaction plus a running state summary that survives
|
|
85
|
-
it, and the agent can read its own earlier sessions in a project.
|
|
86
|
-
- **Project notes** — MINDWEAVE.md is loaded every session and maintained by the agent;
|
|
87
|
-
`@./path` imports split it, a per-folder one applies only there, and `~/.mindweave/`
|
|
88
|
-
holds machine-wide notes. `/init` writes the first one.
|
|
89
|
-
- **MCP servers** — connect external tool servers with `/mcp add` or in plain words;
|
|
90
|
-
their output is untrusted by default. [docs/MCP.md](docs/MCP.md)
|
|
91
|
-
- **Images and web search** — drop a screenshot or write `@shot.png`; ask about a recent
|
|
92
|
-
release and it looks it up, through your own provider.
|
|
93
|
-
- **Seeing your app** — it can capture one named window (never the whole screen, and it
|
|
94
|
-
asks first) to tell an app that started from one that works.
|
|
95
|
-
- **Per-project governor** — standing rules, reusable skills, and forbidden paths or
|
|
96
|
-
commands the agent must respect.
|
|
97
|
-
|
|
98
|
-
## Using it
|
|
99
|
-
|
|
100
|
-
| Command | What it does |
|
|
101
|
-
| --- | --- |
|
|
102
|
-
| `/help` | Lists every command |
|
|
103
|
-
| `/init` | Writes MINDWEAVE.md, the project notes loaded every session |
|
|
104
|
-
| `/provider` · `/model` · `/think` | Who answers, which model, how hard it reasons |
|
|
105
|
-
| `/clear` · `/continue` | Start fresh, or resume an earlier session |
|
|
106
|
-
| `/undo` | Reverts what the last turn changed |
|
|
107
|
-
| `/update` | Installs the newest version and reopens on this conversation |
|
|
108
|
-
| `/mcp` | Manages connected MCP servers |
|
|
109
|
-
| `
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
| [
|
|
119
|
-
| [
|
|
120
|
-
| [
|
|
121
|
-
| [
|
|
122
|
-
| [
|
|
123
|
-
| [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
1
|
+
<h1 align="center">Mindweave (mwcode)</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
A fast, model-adaptive, terminal-native AI coding agent.<br>
|
|
5
|
+
You bring your own key. It runs on your machine. Nothing goes anywhere else.
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="LICENSE">Apache 2.0</a> •
|
|
10
|
+
<a href="https://x.com/mindweavecli">X</a> •
|
|
11
|
+
<a href="https://mindweavedev.netlify.app/">Website</a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## What it is
|
|
17
|
+
|
|
18
|
+
Mindweave is a coding agent that lives in your terminal and works inside your repository:
|
|
19
|
+
reading, searching, editing, running commands, and checking its own work.
|
|
20
|
+
|
|
21
|
+
It runs entirely on your machine. There is no backend, no telemetry and no account. Your
|
|
22
|
+
code and your API key never reach a Mindweave server, because there isn't one.
|
|
23
|
+
|
|
24
|
+
It is built lean on purpose. Most of a coding agent's context budget goes on scaffolding
|
|
25
|
+
the model never needed. Mindweave keeps prompts thin and leaves the room for the model to
|
|
26
|
+
reason about your code.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Mindweave 1
|
|
30
|
+
|
|
31
|
+
Mindweave 1 is out, tagged `mindweave-1`. It is on npm, and the website is up. Install
|
|
32
|
+
with the steps below.
|
|
33
|
+
|
|
34
|
+
What landed in it is in the [changelog](CHANGELOG.md): fourteen model providers, a
|
|
35
|
+
rebuilt terminal interface, reworked prompt caching and token accounting, project notes
|
|
36
|
+
the agent maintains across sessions, and a long list of things that were quietly wrong.
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
Requires **Windows** and **Node.js 20+**. macOS and Linux are not supported yet, and the
|
|
41
|
+
reason is written down in [KNOWN-ISSUES.md](KNOWN-ISSUES.md) rather than glossed over.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g mindweave
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Then, in any project:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cd your-project
|
|
51
|
+
mindweave # or mw, for short
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
To build from source instead — for development, or to run an unreleased change:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git clone https://github.com/mindweave-cli/Mindweave
|
|
58
|
+
cd Mindweave
|
|
59
|
+
npm install
|
|
60
|
+
npm run build
|
|
61
|
+
npm link # makes the `mindweave` command available globally
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
It asks for an API key on first launch and saves it to `~/.mindweave/.env`, so every
|
|
65
|
+
project afterwards just works. `mindweave --help` covers the launch flags; everything
|
|
66
|
+
else is configured inside a session.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## What it can do
|
|
70
|
+
|
|
71
|
+
Short version, one line each. The depth is in the linked pages.
|
|
72
|
+
|
|
73
|
+
- **15 providers, 60 models, one key** — DeepSeek, Anthropic, OpenAI, Gemini, xAI,
|
|
74
|
+
Mistral, Groq, Cerebras, Qwen, Kimi, GLM, Meta, MiniMax, Tencent, plus every
|
|
75
|
+
tool-capable model on OpenRouter. Only the driver you
|
|
76
|
+
use is loaded. Switch with `/provider` and `/model`; remembered per project.
|
|
77
|
+
[PROVIDERS.md](src/drivers/PROVIDERS.md)
|
|
78
|
+
- **Real tools** — read and edit files, multi-file edits, ripgrep search, a shell with
|
|
79
|
+
background jobs, and sub-agents. Every edit comes back with the language server's own
|
|
80
|
+
errors for that file. Read-before-edit is enforced, and `/undo` is a real net.
|
|
81
|
+
- **Deterministic code intelligence** — a background lane indexes your repo with
|
|
82
|
+
tree-sitter and language servers, costing no tokens, so the agent understands the
|
|
83
|
+
codebase, not just the open file.
|
|
84
|
+
- **Session memory** — automatic compaction plus a running state summary that survives
|
|
85
|
+
it, and the agent can read its own earlier sessions in a project.
|
|
86
|
+
- **Project notes** — MINDWEAVE.md is loaded every session and maintained by the agent;
|
|
87
|
+
`@./path` imports split it, a per-folder one applies only there, and `~/.mindweave/`
|
|
88
|
+
holds machine-wide notes. `/init` writes the first one.
|
|
89
|
+
- **MCP servers** — connect external tool servers with `/mcp add` or in plain words;
|
|
90
|
+
their output is untrusted by default. [docs/MCP.md](docs/MCP.md)
|
|
91
|
+
- **Images and web search** — drop a screenshot or write `@shot.png`; ask about a recent
|
|
92
|
+
release and it looks it up, through your own provider.
|
|
93
|
+
- **Seeing your app** — it can capture one named window (never the whole screen, and it
|
|
94
|
+
asks first) to tell an app that started from one that works.
|
|
95
|
+
- **Per-project governor** — standing rules, reusable skills, and forbidden paths or
|
|
96
|
+
commands the agent must respect.
|
|
97
|
+
|
|
98
|
+
## Using it
|
|
99
|
+
|
|
100
|
+
| Command | What it does |
|
|
101
|
+
| --- | --- |
|
|
102
|
+
| `/help` | Lists every command |
|
|
103
|
+
| `/init` | Writes MINDWEAVE.md, the project notes loaded every session |
|
|
104
|
+
| `/provider` · `/model` · `/think` | Who answers, which model, how hard it reasons |
|
|
105
|
+
| `/clear` · `/continue` | Start fresh, or resume an earlier session |
|
|
106
|
+
| `/undo` | Reverts what the last turn changed |
|
|
107
|
+
| `/update` | Installs the newest version and reopens on this conversation |
|
|
108
|
+
| `/mcp` | Manages connected MCP servers |
|
|
109
|
+
| `/feedback` | Sends the maintainer a message, no account needed |
|
|
110
|
+
| `shift-tab` | Cycles interaction modes |
|
|
111
|
+
|
|
112
|
+
Type while it works and your message queues; press up to take it back and edit it.
|
|
113
|
+
|
|
114
|
+
## Read more
|
|
115
|
+
|
|
116
|
+
| | |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| [CHANGELOG.md](CHANGELOG.md) | What changed, and what each fix actually was |
|
|
119
|
+
| [KNOWN-ISSUES.md](KNOWN-ISSUES.md) | What is broken or unfinished, written down rather than carried quietly |
|
|
120
|
+
| [PHILOSOPHY.md](PHILOSOPHY.md) | How the project is run and what gets into the core. Short, and the honest version |
|
|
121
|
+
| [BOUNDARY.md](BOUNDARY.md) | What belongs in the core versus a driver |
|
|
122
|
+
| [CONTRIBUTING.md](CONTRIBUTING.md) | Mechanics, and what is most useful to report |
|
|
123
|
+
| [SECURITY.md](SECURITY.md) | Reporting a vulnerability |
|
|
124
|
+
| [docs/MCP.md](docs/MCP.md) | Connecting and trusting MCP servers |
|
|
125
|
+
|
|
126
|
+
## Contributing
|
|
127
|
+
|
|
128
|
+
Contributions are welcome, especially **model drivers**: Ollama is a stub waiting for
|
|
129
|
+
someone, and a driver is a smaller job than people expect, owning one provider's wire
|
|
130
|
+
format and nothing about how the agent behaves.
|
|
131
|
+
|
|
132
|
+
Small fixes and reproduced bugs with a failing test can go straight to a pull request.
|
|
133
|
+
For anything larger, start a Discussion first. AI-assisted contributions are fine; the
|
|
134
|
+
one rule is that you understand and have tested what you are submitting.
|
|
135
|
+
|
|
136
|
+
Bug reports are genuinely the most useful thing you can send. Mindweave is developed by
|
|
137
|
+
running it on real projects and fixing what breaks, and nearly everything in the
|
|
138
|
+
changelog started as a failure someone watched happen. [What to include, and what is
|
|
139
|
+
especially worth reporting.](CONTRIBUTING.md#reporting-a-bug)
|
|
140
|
+
|
|
141
|
+
Questions are welcome at zallinimann@gmail.com
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
[Apache License 2.0](LICENSE).
|
package/dist/cli/App.js
CHANGED
|
@@ -35,7 +35,8 @@ import { appendForbidden, appendForbiddenCommand } from "../governor/write.js";
|
|
|
35
35
|
import { addRoot, removeRoot } from "../tools/workspace.js";
|
|
36
36
|
import { discoverRelatedRoots } from "../tools/workspaceDiscover.js";
|
|
37
37
|
import { rootLabel, rootsOf, relativize } from "../tools/paths.js";
|
|
38
|
-
import { APPROVAL_DISMISSED, APPROVAL_TEXT } from "../tools/approval.js";
|
|
38
|
+
import { APPROVAL_DISMISSED, APPROVAL_TEXT, readFreeText } from "../tools/approval.js";
|
|
39
|
+
import { buildFeedback, previewOf, refuseReason, sendFeedback, withAddition } from "./feedback.js";
|
|
39
40
|
import { KeySetup } from "./components/KeySetup.js";
|
|
40
41
|
import { setupView } from "./keySetup.js";
|
|
41
42
|
import { KeyManager } from "./components/KeyManager.js";
|
|
@@ -1432,7 +1433,7 @@ export function App({ resumeSessionId, initialScreen }) {
|
|
|
1432
1433
|
/**
|
|
1433
1434
|
* Write a server's config and connect it live — shared by the typed `/mcp add`, the
|
|
1434
1435
|
* `/mcp` box's Add and Edit, and (indirectly, through the same writer) the
|
|
1435
|
-
* `
|
|
1436
|
+
* `mcp_server` tool. One path so a config any of them accepts is one the others
|
|
1436
1437
|
* would too. Connects immediately: writing the file and telling the user to restart
|
|
1437
1438
|
* would defeat the entire point of a guided add.
|
|
1438
1439
|
*/
|
|
@@ -1481,7 +1482,7 @@ export function App({ resumeSessionId, initialScreen }) {
|
|
|
1481
1482
|
/**
|
|
1482
1483
|
* `/mcp add <name> <command|url> [args…]` and `/mcp remove <name>`.
|
|
1483
1484
|
*
|
|
1484
|
-
* Shares its parser and writer with the `
|
|
1485
|
+
* Shares its parser and writer with the `mcp_server` tool, so a config the command
|
|
1485
1486
|
* accepts is exactly one the tool would, and vice versa.
|
|
1486
1487
|
*/
|
|
1487
1488
|
async function mcpConfigCommand(arg) {
|
|
@@ -2320,7 +2321,7 @@ export function App({ resumeSessionId, initialScreen }) {
|
|
|
2320
2321
|
}
|
|
2321
2322
|
// Hand a free-text directive to the model with an instruction wrapper, as its own
|
|
2322
2323
|
// turn — used by the manual /rules and /skills commands (the model does the
|
|
2323
|
-
// "rewrite it well and save it" work via remember_rule /
|
|
2324
|
+
// "rewrite it well and save it" work via remember_rule / the skill tool).
|
|
2324
2325
|
async function runDirective(instruction, activity) {
|
|
2325
2326
|
const s = session.current;
|
|
2326
2327
|
if (!s)
|
|
@@ -2422,6 +2423,41 @@ export function App({ resumeSessionId, initialScreen }) {
|
|
|
2422
2423
|
}
|
|
2423
2424
|
// /analytics — the anonymous usage ping. Bare opens the on/off switch, the same
|
|
2424
2425
|
// fixed box every other setting uses; an argument acts directly, same as /model.
|
|
2426
|
+
// /feedback — a message to the maintainer, from inside the app. No account, no issue
|
|
2427
|
+
// tracker, no mail client: the whole point is that it costs the sender nothing. What
|
|
2428
|
+
// leaves the machine is decided in cli/feedback.ts and shown here before it goes.
|
|
2429
|
+
if (name === "/feedback") {
|
|
2430
|
+
const typed = arg.trim();
|
|
2431
|
+
const message = typed || (await askApproval.current("What would you like to tell the maintainer?", ["Cancel"], undefined, undefined, { label: "Your message", placeholder: "what is missing, broken, or worth adding" }).then((answer) => readFreeText(answer) ?? ""));
|
|
2432
|
+
if (!message.trim())
|
|
2433
|
+
return;
|
|
2434
|
+
// The confirm LOOPS, because the moment you read your own message back is the
|
|
2435
|
+
// moment you remember the thing you left out — usually an email address to reply
|
|
2436
|
+
// to. Typing in the box's own text row adds a line and shows the message again,
|
|
2437
|
+
// rather than cancelling and retyping the whole thing.
|
|
2438
|
+
let text = message;
|
|
2439
|
+
for (;;) {
|
|
2440
|
+
const refusal = refuseReason(text);
|
|
2441
|
+
if (refusal)
|
|
2442
|
+
return say(refusal);
|
|
2443
|
+
const feedback = buildFeedback(text, appVersion());
|
|
2444
|
+
const choice = await askApproval.current(previewOf(feedback), ["Send it", "Don't send"], undefined, undefined, {
|
|
2445
|
+
label: "add a line",
|
|
2446
|
+
placeholder: "your email for a reply, or more detail",
|
|
2447
|
+
});
|
|
2448
|
+
const added = readFreeText(choice);
|
|
2449
|
+
if (added !== null) {
|
|
2450
|
+
text = withAddition(text, added);
|
|
2451
|
+
continue;
|
|
2452
|
+
}
|
|
2453
|
+
if (choice !== "Send it")
|
|
2454
|
+
return note("Not sent.");
|
|
2455
|
+
note("sending…");
|
|
2456
|
+
const result = await sendFeedback(feedback);
|
|
2457
|
+
note(result.message, result.ok ? undefined : { error: true });
|
|
2458
|
+
return;
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2425
2461
|
if (name === "/analytics") {
|
|
2426
2462
|
const verb = arg.trim().toLowerCase();
|
|
2427
2463
|
if (verb === "on" || verb === "off") {
|
|
@@ -2674,7 +2710,7 @@ export function App({ resumeSessionId, initialScreen }) {
|
|
|
2674
2710
|
// `/model openrouter` alone: that provider's picker.
|
|
2675
2711
|
if (!words)
|
|
2676
2712
|
return setOverlay({ kind: "model", providerId });
|
|
2677
|
-
const picked = providerId === current ? here : resolveChoice(words, orderedModelsOf(providerId), "model");
|
|
2713
|
+
const picked = providerId === current && words === arg.trim() ? here : resolveChoice(words, orderedModelsOf(providerId), "model");
|
|
2678
2714
|
if (picked.kind === "error")
|
|
2679
2715
|
return say(picked.message);
|
|
2680
2716
|
// Several fit: show exactly those, in the picker, rather than a list to retype from.
|
|
@@ -2862,7 +2898,7 @@ export function App({ resumeSessionId, initialScreen }) {
|
|
|
2862
2898
|
if (name === "/skills") {
|
|
2863
2899
|
if (arg) {
|
|
2864
2900
|
await runDirective(`The user wants a new reusable skill for this project: "${arg}". Design it and save it ` +
|
|
2865
|
-
`with
|
|
2901
|
+
`with the skill tool — a short invocation name, a one-line description, and the procedure ` +
|
|
2866
2902
|
`as a clear markdown checklist (use $ARGUMENTS/$1 if it should take input). Then confirm.`, "creating a skill…");
|
|
2867
2903
|
return;
|
|
2868
2904
|
}
|
|
@@ -2999,7 +3035,7 @@ export function App({ resumeSessionId, initialScreen }) {
|
|
|
2999
3035
|
return (_jsx(TrustGate, { rows: rows, cwd: startCwd.current, breadth: trustBreadth, warning: breadthWarning(trustBreadth, startCwd.current), persists: trustPersists(trustBreadth), version: versionLabel(), docsUrl: MINDWEAVE_DOCS_URL, onTrust: () => {
|
|
3000
3036
|
rememberTrust(projectDir(startCwd.current), trustBreadth);
|
|
3001
3037
|
setTrustOpen(false);
|
|
3002
|
-
}, onQuit: () => exit() }));
|
|
3038
|
+
}, onQuit: () => process.exit(0) }));
|
|
3003
3039
|
}
|
|
3004
3040
|
// FIRST RUN: nothing can run yet, so offer every provider rather than one. The user
|
|
3005
3041
|
// adds as many keys as they like and continues when they are ready. See KeySetup.
|
|
@@ -3151,9 +3187,12 @@ export function App({ resumeSessionId, initialScreen }) {
|
|
|
3151
3187
|
return {
|
|
3152
3188
|
label: m.label + (m.id === id ? " ✓" : ""),
|
|
3153
3189
|
description: m.description ? `${facts} · ${m.description}` : facts,
|
|
3190
|
+
// Searched but not shown, so a filter opened by `/model <words>` matches the same
|
|
3191
|
+
// things the words matched: the id as well as the name.
|
|
3192
|
+
keywords: m.id,
|
|
3154
3193
|
};
|
|
3155
3194
|
});
|
|
3156
|
-
return (_jsx(Picker, { title: `Choose a ${pickerProvider} model`, items: items, width: width, maxRows: maxRows, initialIndex: Math.max(0, models.findIndex((m) => m.id === id)), initialFilter: overlay.filter, onSelect: onOverlaySelect, onCancel: onOverlayCancel }));
|
|
3195
|
+
return (_jsx(Picker, { title: `Choose ${/^[aeiou]/i.test(pickerProvider) ? "an" : "a"} ${pickerProvider} model`, items: items, width: width, maxRows: maxRows, initialIndex: Math.max(0, models.findIndex((m) => m.id === id)), initialFilter: overlay.filter, onSelect: onOverlaySelect, onCancel: onOverlayCancel }));
|
|
3157
3196
|
}
|
|
3158
3197
|
if (overlay.kind === "think") {
|
|
3159
3198
|
const model = cur?.modelConfig.model ?? DEFAULT_MODEL_CONFIG.model;
|