@agi-fans/dsh-tui 0.24.1 → 0.26.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/lib/CHANGELOG.md +42 -2
- package/lib/chrome/box.d.ts +7 -0
- package/lib/chrome/box.js +1 -0
- package/lib/chrome/box.js.map +1 -1
- package/lib/chrome/main-screen-renderer.d.ts +4 -2
- package/lib/chrome/main-screen-renderer.js +11 -5
- package/lib/chrome/main-screen-renderer.js.map +1 -1
- package/lib/chrome/renderer.d.ts +12 -0
- package/lib/chrome/renderer.js +1 -1
- package/lib/chrome/renderer.js.map +1 -1
- package/lib/chrome/status-line.js +3 -2
- package/lib/chrome/status-line.js.map +1 -1
- package/lib/chrome/width.d.ts +2 -0
- package/lib/chrome/width.js +10 -0
- package/lib/chrome/width.js.map +1 -1
- package/lib/commands/session.js +23 -12
- package/lib/commands/session.js.map +1 -1
- package/lib/definition.d.ts +13 -2
- package/lib/input/actions.d.ts +1 -1
- package/lib/input/actions.js +16 -5
- package/lib/input/actions.js.map +1 -1
- package/lib/input/clipboard.d.ts +1 -1
- package/lib/input/clipboard.js +10 -4
- package/lib/input/clipboard.js.map +1 -1
- package/lib/input/editor.js +4 -0
- package/lib/input/editor.js.map +1 -1
- package/lib/input/image-paste.d.ts +1 -2
- package/lib/input/image-paste.js +2 -7
- package/lib/input/image-paste.js.map +1 -1
- package/lib/input/key-platform.d.ts +2 -0
- package/lib/input/key-platform.js +8 -0
- package/lib/input/key-platform.js.map +1 -0
- package/lib/input/keybindings-config.d.ts +2 -1
- package/lib/input/keybindings-config.js +14 -9
- package/lib/input/keybindings-config.js.map +1 -1
- package/lib/input/keys.d.ts +2 -0
- package/lib/input/keys.js +10 -0
- package/lib/input/keys.js.map +1 -1
- package/lib/locale/zh.d.ts +4 -3
- package/lib/locale/zh.js +4 -3
- package/lib/locale/zh.js.map +1 -1
- package/lib/runtime/help-reader.d.ts +1 -1
- package/lib/runtime/help-reader.js +2 -2
- package/lib/runtime/help-reader.js.map +1 -1
- package/lib/runtime/herdr-agent.d.ts +2 -2
- package/lib/runtime/herdr-agent.js +2 -2
- package/lib/runtime/herdr-agent.js.map +1 -1
- package/lib/runtime/provider-local.d.ts +4 -1
- package/lib/runtime/provider-local.js +327 -71
- package/lib/runtime/provider-local.js.map +1 -1
- package/lib/runtime/terminal-notifications.d.ts +3 -1
- package/lib/runtime/terminal-notifications.js +7 -2
- package/lib/runtime/terminal-notifications.js.map +1 -1
- package/lib/runtime/terminal-session.d.ts +1 -0
- package/lib/runtime/terminal-session.js +1 -0
- package/lib/runtime/terminal-session.js.map +1 -1
- package/lib/runtime/terminal-state.d.ts +10 -1
- package/lib/runtime/terminal-state.js +39 -7
- package/lib/runtime/terminal-state.js.map +1 -1
- package/lib/session/authorization-interaction.js +3 -3
- package/lib/session/authorization-interaction.js.map +1 -1
- package/lib/session/content-text.d.ts +5 -0
- package/lib/session/content-text.js +7 -0
- package/lib/session/content-text.js.map +1 -1
- package/lib/session/interaction-adapter.js +1 -0
- package/lib/session/interaction-adapter.js.map +1 -1
- package/lib/session/session-controller.js +40 -6
- package/lib/session/session-controller.js.map +1 -1
- package/lib/views/file-browser.d.ts +3 -0
- package/lib/views/file-browser.js +1 -0
- package/lib/views/file-browser.js.map +1 -1
- package/lib/views/hotkeys.d.ts +4 -4
- package/lib/views/hotkeys.js +24 -14
- package/lib/views/hotkeys.js.map +1 -1
- package/lib/views/prompt-selector.d.ts +1 -0
- package/lib/views/prompt-selector.js +6 -3
- package/lib/views/prompt-selector.js.map +1 -1
- package/lib/views/settings-list.js +3 -3
- package/lib/views/settings-list.js.map +1 -1
- package/lib/views/trajectory.js +5 -5
- package/lib/views/trajectory.js.map +1 -1
- package/lib/views/transcript-render.d.ts +1 -0
- package/lib/views/transcript-render.js +48 -29
- package/lib/views/transcript-render.js.map +1 -1
- package/lib/views/transcript-types.d.ts +1 -4
- package/lib/views/transcript-types.js +4 -7
- package/lib/views/transcript-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* fold and render both use.
|
|
5
5
|
* @module @agi-fans/dsh-tui
|
|
6
6
|
*/
|
|
7
|
-
import { blocksText } from "../session/content-text.js";
|
|
7
|
+
import { blocksText, imageMarker } from "../session/content-text.js";
|
|
8
8
|
/** Empty starting state. */
|
|
9
9
|
export function initialTranscript() {
|
|
10
10
|
return {
|
|
@@ -22,13 +22,11 @@ export function initialTranscript() {
|
|
|
22
22
|
/**
|
|
23
23
|
* Extract plain text from text blocks, naming other block kinds.
|
|
24
24
|
*
|
|
25
|
-
*
|
|
26
|
-
* itself is the content, so the text only says what kind of thing sits at this
|
|
27
|
-
* point. Dimensions, byte counts and the full MIME string belong in the tool
|
|
28
|
-
* that produced the file, not in every message that carries it.
|
|
25
|
+
* Image labels use the composer's numbering and dimension format in content order.
|
|
29
26
|
*/
|
|
30
27
|
export function contentToText(content) {
|
|
31
28
|
let text = '';
|
|
29
|
+
let imageIndex = 0;
|
|
32
30
|
for (const block of content) {
|
|
33
31
|
if (block.type === 'text') {
|
|
34
32
|
text += block.text;
|
|
@@ -39,8 +37,7 @@ export function contentToText(content) {
|
|
|
39
37
|
if (text !== '' && !/\s$/u.test(text))
|
|
40
38
|
text += ' ';
|
|
41
39
|
if (block.type === 'image') {
|
|
42
|
-
|
|
43
|
-
text += `[Image: ${ref.mediaType}]`;
|
|
40
|
+
text += imageMarker(imageIndex++, block.attachment);
|
|
44
41
|
}
|
|
45
42
|
else {
|
|
46
43
|
const ref = block.attachment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript-types.js","sourceRoot":"","sources":["../../src/views/transcript-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"transcript-types.js","sourceRoot":"","sources":["../../src/views/transcript-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,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