Add db.coll.stats() / dataSize() / storageSize(scale) / totalIndexSize()
so these MongoDB shell commands return a result grid instead of the
"Use MongoDB shell-style commands" error (issue #2529).
- backend: collStats via mongo_driver.collection_stats, wired through
mongo_ops, the dbx-web /mongo/collection-stats route, the tauri
mongo_collection_stats command, and the MCP data bridge
- node-core: parseMongoCollectionStatsCommand + result formatter and
executeQuery dispatch (web build + MCP path)
- desktop: mirror the parser/executor/autocomplete in mongoShellCommand.ts,
queryStore.ts, api/tauri/http facade, and mongoCompletion.ts
- tests for the parser, result formatter, and completion entries
Close#2529
Add MongoDB TLS options (`tlsAllowInvalidCertificates`, `retryWrites`, `tlsCAFile`) to the connection form with backend URL normalization and DocumentDB/SSH tunnel guidance, while preserving legacy `tlsCAFile` in `url_params` for existing DocumentDB users, hardening auth failure hint matching, and clarifying TLS bypass security labels.
Use find().sort() for MongoDB query grid sorting instead of SQL ORDER BY,
and normalize document browser sort input the same way as filters.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(ai): support editing sent user messages
Adds inline edit support for user messages in the AI chat panel.
Hover over a user message to reveal the edit button; confirming the
edit truncates all subsequent history and re-sends with the new content.
* fix(ai): fix IME composition and ref-focus regression in message edit
- Handle IME composition events in onEditKeydown to prevent accidental
submission on Enter during CJK candidate selection
- Replace per-render :ref focus callback with nextTick + data attribute
to avoid cursor jumping on every keystroke
- Extract visibleToActualIndex into aiMessageEdit.ts for testability
- Add 8 unit tests covering index mapping with contextSummary messages
* fix(ai): prevent data loss and mention pollution in message edit
- Guard connection/config before truncating messages to prevent silent data
loss when send() bails early
- Clear selectedMentions before resend to prevent stale chips from polluting
edited message content
* fix(ai): limit indexes and foreign keys per table in schema context
Prevent AI input token spikes caused by tables with large numbers of
indexes or foreign keys being fully serialized into the system prompt.
Apply a default cap of 10 indexes and 10 FKs per table in all three
schema-loading paths: focused_table mode, database mode, and
loadMentionedTableContext for @-mentioned tables.
Both limits are configurable via buildAiContext options
(maxIndexesPerTable, maxFksPerTable).
* fix(ai): truncate large column values in result preview
Prevent input token explosion when the active tab contains large text
or JSON fields (e.g. request_body, response_body in audit log tables).
formatResultPreview previously serialized each value without any length
limit, so 5 rows from a wide table with multi-KB text columns could
produce 100K+ tokens in the system prompt.
Cap each serialized value at 200 characters with an ellipsis suffix.