dsh-code 1.0.6 → 1.2.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/README.en.md +123 -26
- package/README.md +124 -27
- package/bin/deepseek.mjs +283 -35
- package/cordis.patch.yml +97 -0
- package/lib/index.mjs +5008 -881
- package/lib/session-query.mjs +150 -0
- package/lib/startup.mjs +4 -4
- package/lib/{theme-DCT8Y2xf.mjs → theme-7u5Qo3dF.mjs} +657 -20
- package/lib/types/app.d.ts +106 -62
- package/lib/types/authorization-panel.d.ts +3 -3
- package/lib/types/git-workflow.d.ts +91 -2
- package/lib/types/i18n.d.ts +39 -0
- package/lib/types/index.d.ts +100 -1
- package/lib/types/input-split.d.ts +1 -1
- package/lib/types/kernel-panels.d.ts +107 -29
- package/lib/types/language-panel.d.ts +12 -0
- package/lib/types/locales/en.d.ts +450 -0
- package/lib/types/locales/zh.d.ts +9 -0
- package/lib/types/mentions.d.ts +7 -3
- package/lib/types/models.d.ts +14 -0
- package/lib/types/panel-accent.d.ts +28 -0
- package/lib/types/rainbow.d.ts +69 -0
- package/lib/types/render/animations.d.ts +42 -0
- package/lib/types/render/editor.d.ts +4 -3
- package/lib/types/render/ime-cursor.d.ts +60 -0
- package/lib/types/render/inspector.d.ts +26 -0
- package/lib/types/render/lines.d.ts +21 -1
- package/lib/types/render/markdown.d.ts +1 -1
- package/lib/types/render/projection.d.ts +130 -4
- package/lib/types/render/status.d.ts +9 -9
- package/lib/types/render/text.d.ts +6 -0
- package/lib/types/render/usage.d.ts +113 -0
- package/lib/types/session-directory.d.ts +17 -0
- package/lib/types/session-query.d.ts +92 -0
- package/lib/types/startup.d.ts +1 -1
- package/lib/types/terminal-title.d.ts +66 -0
- package/lib/types/theme-panel.d.ts +2 -2
- package/lib/types/theme.d.ts +271 -52
- package/lib/types/update-panel.d.ts +49 -0
- package/lib/types/update.d.ts +75 -0
- package/lib/types/version.d.ts +4 -3
- package/package.json +246 -90
- package/src/app.ts +1369 -509
- package/src/approval.ts +166 -166
- package/src/authorization-panel.ts +19 -16
- package/src/editor-keys.ts +371 -371
- package/src/git-workflow.ts +229 -3
- package/src/i18n.ts +68 -0
- package/src/index.ts +534 -80
- package/src/input-split.ts +3 -3
- package/src/internals.ts +5 -0
- package/src/kernel-panels.ts +554 -86
- package/src/keyboard.ts +5 -4
- package/src/language-panel.ts +53 -0
- package/src/locales/en.ts +489 -0
- package/src/locales/zh.ts +488 -0
- package/src/mentions.ts +8 -4
- package/src/models.ts +264 -212
- package/src/panel-accent.ts +41 -0
- package/src/presets.ts +1 -1
- package/src/provider-settings.ts +1 -1
- package/src/rainbow.ts +208 -0
- package/src/render/animations.ts +104 -6
- package/src/render/editor.ts +25 -24
- package/src/render/export.ts +116 -95
- package/src/render/ime-cursor.ts +147 -0
- package/src/render/inspector.ts +42 -0
- package/src/render/lines.ts +628 -415
- package/src/render/markdown.ts +15 -3
- package/src/render/projection.ts +572 -21
- package/src/render/status.ts +59 -39
- package/src/render/text.ts +14 -0
- package/src/render/tool-preview.ts +77 -77
- package/src/render/usage.ts +430 -0
- package/src/render/width.ts +2 -2
- package/src/session-directory.ts +8 -6
- package/src/session-query.ts +239 -0
- package/src/startup.ts +3 -3
- package/src/subagents.ts +229 -229
- package/src/terminal-title.ts +190 -0
- package/src/theme-panel.ts +17 -21
- package/src/theme.ts +281 -33
- package/src/update-panel.ts +256 -0
- package/src/update.ts +126 -0
- package/src/version.ts +58 -20
- package/src/whale-glyph.ts +23 -23
package/src/input-split.ts
CHANGED
|
@@ -60,7 +60,7 @@ export function createKeypressSplitter(): KeypressSplitter {
|
|
|
60
60
|
buffer = buffer.slice(stop)
|
|
61
61
|
continue
|
|
62
62
|
}
|
|
63
|
-
const head = buffer[0]
|
|
63
|
+
const head = buffer[0]
|
|
64
64
|
if (head !== '\x1b') {
|
|
65
65
|
// Plain bytes key one at a time; a surrogate pair is one grapheme
|
|
66
66
|
// and must not split into two lone surrogates.
|
|
@@ -74,7 +74,7 @@ export function createKeypressSplitter(): KeypressSplitter {
|
|
|
74
74
|
if (buffer[1] === '[') {
|
|
75
75
|
let end = -1
|
|
76
76
|
for (let at = 2; at < buffer.length; at += 1) {
|
|
77
|
-
if (isCsiFinal(buffer[at]
|
|
77
|
+
if (isCsiFinal(buffer[at])) {
|
|
78
78
|
end = at
|
|
79
79
|
break
|
|
80
80
|
}
|
|
@@ -134,7 +134,7 @@ export interface TuiStdin extends PassThrough {
|
|
|
134
134
|
* @param source - the process (or harness) input stream in raw mode.
|
|
135
135
|
* @returns the proxy stream plus a dispose that detaches the tap.
|
|
136
136
|
*/
|
|
137
|
-
export function createSplitStdin(source: NodeJS.ReadStream): { stdin: TuiStdin; dispose()
|
|
137
|
+
export function createSplitStdin(source: NodeJS.ReadStream): { stdin: TuiStdin; dispose: () => void } {
|
|
138
138
|
// Object mode matters: a plain stream's read() without a size drains the
|
|
139
139
|
// whole buffer as one chunk, which would re-coalesce the units this module
|
|
140
140
|
// exists to separate. In object mode every pushed unit reads back alone.
|
package/src/internals.ts
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
shouldEnableKeyboardEnhancement,
|
|
20
20
|
} from './keyboard.ts'
|
|
21
21
|
import { createSplitStdin } from './input-split.ts'
|
|
22
|
+
import { ensureVsCodeTabTitleSetting } from './terminal-title.ts'
|
|
22
23
|
|
|
23
24
|
/** A mounted terminal app instance; the runner owns unmount ordering. */
|
|
24
25
|
export interface TuiMount {
|
|
@@ -56,6 +57,10 @@ export const internals: {
|
|
|
56
57
|
+ BRACKETED_PASTE_ENABLE
|
|
57
58
|
+ (focusReporting ? TERMINAL_FOCUS_REPORT_ENABLE : ''),
|
|
58
59
|
)
|
|
60
|
+
// Cosmetic best effort: inside a VS Code integrated terminal the tab
|
|
61
|
+
// shows the process name ("node") unless the user settings map it to
|
|
62
|
+
// the sequence title; align them once. Total function, never throws.
|
|
63
|
+
ensureVsCodeTabTitleSetting()
|
|
59
64
|
// App owns Ctrl+C's deliberate three-state contract (interrupt, clear
|
|
60
65
|
// draft, quit). Ink's default `exitOnCtrlC: true` would intercept the
|
|
61
66
|
// normalized control byte first, unmount only its renderer, and leave the
|