@wirecat/cli-core 0.674.0 → 0.675.0
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
|
|
|
5
5
|
minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
|
|
6
6
|
shape of this file.
|
|
7
7
|
|
|
8
|
+
## 0.675.0 — 16.11.2026
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`--from` on a search names the sender, not a date.** `search all`, `search messages` and `search conversations`
|
|
13
|
+
answer `--from`, `--sender` and `--author` with `from:<sender>` in the query (in `--filter` for conversations),
|
|
14
|
+
as `from:me` finds what the owner wrote. 0.672.0 answered `--from` with where the dates go.
|
|
15
|
+
- **`search conversations` no longer spends seconds working out which chats are behind.** The check behind the
|
|
16
|
+
"changed since the last build" hint read every chunk of the store once per built chat, because SQLite chose the
|
|
17
|
+
wrong table to start from. It now reads only the chat's own conversations. On a store with about 950,000 messages a
|
|
18
|
+
warm search went from about 12 s to about 3 s. `conversations status` and `conversations embed` use the same query
|
|
19
|
+
and are faster too.
|
|
20
|
+
|
|
8
21
|
## 0.674.0 — 16.11.2026
|
|
9
22
|
|
|
10
23
|
### Added
|
|
@@ -5,7 +5,7 @@ import { SAVE_HELP } from "../../meetings/index.js";
|
|
|
5
5
|
import { searchNotesOf } from "../../services/notes-search.js";
|
|
6
6
|
import { LOCAL_READ, REMOTE_READ } from "../effects.js";
|
|
7
7
|
import { renderAnswer } from "../envelope.js";
|
|
8
|
-
import { AROUND_HINT, END_FLAGS, hintsFor, START_FLAGS, withOptionHints } from "../option-hints.js";
|
|
8
|
+
import { AROUND_HINT, END_FLAGS, hintsFor, SENDER_FLAGS, START_FLAGS, withOptionHints } from "../option-hints.js";
|
|
9
9
|
import { positiveCount } from "../paging.js";
|
|
10
10
|
import { runsSearchCommand } from "../runs/search-command.js";
|
|
11
11
|
import { commandAt } from "../steps.js";
|
|
@@ -198,6 +198,7 @@ export const searchCommand = (messenger, { topics = false } = {}) => {
|
|
|
198
198
|
: {
|
|
199
199
|
"--chat": `search in one chat with chat:<chat> in the query: search ${path} 'chat:<chat> words'`,
|
|
200
200
|
"--around": AROUND_HINT,
|
|
201
|
+
...hintsFor(SENDER_FLAGS, `the sender goes in the query: search ${path} 'from:<sender> words' (from:me for you)`),
|
|
201
202
|
}),
|
|
202
203
|
...(path === "all" ? {} : { "--only": ONLY_HINT }),
|
|
203
204
|
});
|
|
@@ -209,6 +210,7 @@ export const searchCommand = (messenger, { topics = false } = {}) => {
|
|
|
209
210
|
...hintsFor(END_FLAGS, "put the end in the filter: --filter 'date<2026-10-20'"),
|
|
210
211
|
"--around": AROUND_HINT,
|
|
211
212
|
"--only": ONLY_HINT,
|
|
213
|
+
...hintsFor(SENDER_FLAGS, "the sender goes in the filter: --filter 'from:<sender>' (from:me for you)"),
|
|
212
214
|
});
|
|
213
215
|
return search;
|
|
214
216
|
};
|
|
@@ -9,4 +9,6 @@ export declare const hintsFor: (flags: readonly string[], hint: string) => Recor
|
|
|
9
9
|
/** Date flags agents guess; commander would suggest an unrelated near name (`--since` → `--source`). */
|
|
10
10
|
export declare const START_FLAGS: string[];
|
|
11
11
|
export declare const END_FLAGS: string[];
|
|
12
|
+
/** In a message search `--from` means the sender, as `from:` does in the query, never a date. */
|
|
13
|
+
export declare const SENDER_FLAGS: string[];
|
|
12
14
|
export declare const AROUND_HINT: string;
|
package/dist/cli/option-hints.js
CHANGED
|
@@ -16,7 +16,9 @@ export const withOptionHints = (command, hints) => {
|
|
|
16
16
|
/** The same hint for each of these flags. */
|
|
17
17
|
export const hintsFor = (flags, hint) => Object.fromEntries(flags.map((flag) => [flag, hint]));
|
|
18
18
|
/** Date flags agents guess; commander would suggest an unrelated near name (`--since` → `--source`). */
|
|
19
|
-
export const START_FLAGS = ["--since", "--after", "--
|
|
20
|
-
export const END_FLAGS = ["--until", "--before", "--
|
|
19
|
+
export const START_FLAGS = ["--since", "--after", "--since-date", "--after-date", "--start"];
|
|
20
|
+
export const END_FLAGS = ["--until", "--before", "--until-date", "--before-date", "--end"];
|
|
21
|
+
/** In a message search `--from` means the sender, as `from:` does in the query, never a date. */
|
|
22
|
+
export const SENDER_FLAGS = ["--from", "--sender", "--author"];
|
|
21
23
|
export const AROUND_HINT = "read the messages either side of one: messages context <hit ref> --before-n 5 --after-n 5 " +
|
|
22
24
|
"(or messages context <chat> <message>)";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { chunkHash, chunkTextOf } from "../../conversations/chunks.js";
|
|
2
2
|
import { sql } from "./drizzle/core.js";
|
|
3
3
|
import { ensureVectorIndex, searchIndex, unitVector } from "./vector-index.js";
|
|
4
|
+
/** No planner statistics in the store: without CROSS JOIN SQLite reads every chunk of the store, of every chat. */
|
|
4
5
|
const currentChunks = (chatKey) => sql `SELECT k.content_hash, k.chunkable_id AS conversation_id, r.first_message_id,
|
|
5
|
-
r.last_message_id, r.text_start, r.text_end FROM
|
|
6
|
-
JOIN
|
|
6
|
+
r.last_message_id, r.text_start, r.text_end FROM conversations c
|
|
7
|
+
CROSS JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = c.id
|
|
8
|
+
JOIN chunk_messages r ON r.chunk_id = k.id
|
|
7
9
|
WHERE c.chat_id = ${chatKey}
|
|
8
10
|
AND c.build = (SELECT s.current_build FROM conversation_state s WHERE s.chat_id = ${chatKey})`;
|
|
9
11
|
/**
|
|
@@ -308,7 +310,7 @@ export const readiness = ({ orm }, chatKey, model) => {
|
|
|
308
310
|
JOIN conversations c ON c.id = cm.conversation_id AND c.build = ${build}
|
|
309
311
|
WHERE m.chat_id = ${chatKey} AND (m.deleted_at IS NOT NULL OR ${editedSince(sql `m.id`)})),
|
|
310
312
|
stale AS (SELECT DISTINCT k.content_hash AS hash FROM changed g
|
|
311
|
-
JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = g.conversation_id
|
|
313
|
+
CROSS JOIN chunks k ON k.chunkable_type = 'conversation' AND k.chunkable_id = g.conversation_id
|
|
312
314
|
JOIN chunk_messages r ON r.chunk_id = k.id
|
|
313
315
|
JOIN messages f ON f.id = r.first_message_id JOIN messages l ON l.id = r.last_message_id
|
|
314
316
|
WHERE (g.sent_at, g.id) >= (f.sent_at, f.id) AND (g.sent_at, g.id) <= (l.sent_at, l.id)),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.675.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|