Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .dsh-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
]
},
"dsh-editor": {
"version": "0.1.0-alpha.14",
"version": "0.1.0-alpha.15",
"rows": [
"editor"
],
Expand All @@ -63,7 +63,7 @@
]
},
"dsh-gittree": {
"version": "0.1.0-alpha.5",
"version": "0.1.0-alpha.6",
"rows": [
"gittree"
],
Expand All @@ -75,7 +75,7 @@
]
},
"dsh-image": {
"version": "0.1.0-alpha.2",
"version": "0.1.0-alpha.3",
"rows": [
"image"
],
Expand Down Expand Up @@ -107,7 +107,7 @@
]
},
"dsh-audio": {
"version": "0.1.0-alpha.8",
"version": "0.1.0-alpha.9",
"rows": [
"audio"
],
Expand Down Expand Up @@ -213,7 +213,7 @@
]
},
"dsh-video": {
"version": "0.1.0-alpha.2",
"version": "0.1.0-alpha.3",
"rows": [
"video"
],
Expand Down Expand Up @@ -258,7 +258,7 @@
"role": "Browser: the pack's own web surface, which fetches and renders a page on the HOST in a disposable sandboxed engine behind an egress gate instead of framing it remotely - three tools and three routes. Currently disabled by dsh-vn-master's `browser` row; re-enabling it is deleting those two lines. See packages/dsh-browser/README.md."
},
"dsh-diagrams": {
"version": "0.1.0-alpha.8",
"version": "0.1.0-alpha.9",
"rows": [
"diagrams"
],
Expand Down Expand Up @@ -296,7 +296,7 @@
]
},
"dsh-pdf": {
"version": "0.1.0-alpha.9",
"version": "0.1.0-alpha.10",
"rows": [
"pdf"
],
Expand Down
22 changes: 18 additions & 4 deletions packages/dsh-audio/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ window.__ModuleLoader__.load({
/** The tab kind this package owns. */
const KIND = 'audio'
/** Version marker shown in the toolbar, so a loaded bundle is easy to verify. */
const PLUGIN_VERSION = '0.1.0-alpha.8'
const PLUGIN_VERSION = '0.1.0-alpha.9'
/** Address grammar owned by @deepseek-ai/dsh-util-workspace-path. */
const FILE_PREFIX = 'dsh-resource://file/'
const SESSION_SEGMENT = 'session/'
Expand Down Expand Up @@ -1799,10 +1799,24 @@ window.__ModuleLoader__.load({
// 10. Small React helpers
// =====================================================================
/** The tab information a pane body was handed, or null when it has none. */
function tabInfoNow(props) {
if (!props || typeof props.useTabInfo !== 'function') return null
/**
* The pane seat's tab-info hook, whichever shape it arrived in: `useTabInfo`
* (the prop the 0.2.0 seat handed a body) or `hooks.tabInfo` (the hook the
* 0.2.1+ seat declares in its inject). A seat that gives neither yields null,
* which every body already treats as "this pane has no tab".
*/
function tabInfoHookOf(props) {
if (!props) return null
if (typeof props.useTabInfo === 'function') return props.useTabInfo
if (props.hooks && typeof props.hooks.tabInfo === 'function') return props.hooks.tabInfo
return null
}

function tabInfoNow(props) {
const useTabInfo = tabInfoHookOf(props)
if (useTabInfo === null) return null
try {
const info = props.useTabInfo()
const info = useTabInfo()
return info && info.tab ? info : null
} catch (err) {
return null
Expand Down
2 changes: 1 addition & 1 deletion packages/dsh-audio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsh-audio",
"version": "0.1.0-alpha.8",
"version": "0.1.0-alpha.9",
"description": "Audio: WAV/AIFF/FLAC as a waveform (one row per channel, adaptive ruler, RMS core, sample-level zoom, selection, audio-clock playback) plus the MEDIA panel in the left column - a bounded scan of every audio, image, video and GIF file the conversation can reach, with an inline preview and a one-click hand-off to the tab that owns the type. Client-only, read in 2 MiB windows, about files only: no microphone, no device enumeration, no output routing.",
"type": "module",
"main": "lib/index.js",
Expand Down
22 changes: 18 additions & 4 deletions packages/dsh-diagrams/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ window.__ModuleLoader__.load({
const EXAMPLE_ROUTE = '/api/dsh-diagrams/example'
const DOCUMENT_ROUTE = '/api/dsh-diagrams/document'
/** Version marker shown in the panel footer, so a fresh bundle is easy to verify. */
const PLUGIN_VERSION = '0.1.0-alpha.8'
const PLUGIN_VERSION = '0.1.0-alpha.9'
/**
* The zoom ladder the diagram tab steps through, the share of the pane a
* picture occupies at 100%, and the last zoom each tab was left at.
Expand Down Expand Up @@ -294,10 +294,24 @@ window.__ModuleLoader__.load({
* none. `useTabInfo` throws while its tab is not committed, so a body that
* only wants the visibility flag must not let that take it down.
*/
function tabInfoNow(props) {
if (!props || typeof props.useTabInfo !== 'function') return null
/**
* The pane seat's tab-info hook, whichever shape it arrived in: `useTabInfo`
* (the prop the 0.2.0 seat handed a body) or `hooks.tabInfo` (the hook the
* 0.2.1+ seat declares in its inject). A seat that gives neither yields null,
* which every body already treats as "this pane has no tab".
*/
function tabInfoHookOf(props) {
if (!props) return null
if (typeof props.useTabInfo === 'function') return props.useTabInfo
if (props.hooks && typeof props.hooks.tabInfo === 'function') return props.hooks.tabInfo
return null
}

function tabInfoNow(props) {
const useTabInfo = tabInfoHookOf(props)
if (useTabInfo === null) return null
try {
const info = props.useTabInfo()
const info = useTabInfo()
return info && info.tab ? info : null
} catch (err) {
return null
Expand Down
2 changes: 1 addition & 1 deletion packages/dsh-diagrams/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsh-diagrams",
"version": "0.1.0-alpha.8",
"version": "0.1.0-alpha.9",
"description": "Diagrams: Mermaid, TikZ and the Diagram Design kit in one bundle - seven `diagram_*` tools whose writes are validated on the host before they are stored, a conversation store plus a shared library, a tab per diagram with an export menu, an index page that also browses the kit's 71 example keys, and browser render reports.",
"type": "module",
"main": "lib/index.js",
Expand Down
21 changes: 18 additions & 3 deletions packages/dsh-editor/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ window.__ModuleLoader__.load({
const FILE_PREFIX = 'dsh-resource://file/'
const SESSION_SEGMENT = 'session/'
/** Version marker shown on the toolbar so a freshly loaded bundle is easy to verify. */
const PLUGIN_VERSION = '0.1.0-alpha.14'
const PLUGIN_VERSION = '0.1.0-alpha.15'
/** The client service dsh-modal provides; resolved lazily, never required. */
const MODAL_SERVICE = 'modals'
/** The client service @deepseek-ai/dsh-client-ui-theme provides; resolved lazily too. */
Expand Down Expand Up @@ -1617,8 +1617,22 @@ window.__ModuleLoader__.load({
* The tab body dispatched by `sidebar.right.pane.tab`: a file address gets
* that file's editor, and the tab's own page address gets a blank document.
*/
/**
* The pane seat's tab-info hook, whichever shape it arrived in: `useTabInfo`
* (the prop the 0.2.0 seat handed a body) or `hooks.tabInfo` (the hook the
* 0.2.1+ seat declares in its inject). A seat that gives neither yields null,
* which every body here already treats as "this pane has no tab".
*/
function tabInfoHookOf(props) {
if (!props) return null
if (typeof props.useTabInfo === 'function') return props.useTabInfo
if (props.hooks && typeof props.hooks.tabInfo === 'function') return props.hooks.tabInfo
return null
}

function EditorBody(props) {
const info = props.useTabInfo()
const useTabInfo = tabInfoHookOf(props)
const info = useTabInfo !== null ? useTabInfo() : null
const tab = info.tab
const parsed = parseFileAddress(tab.contentId)
const file = parsed && parsed.scope === 'session' && parsed.path !== '' ? parsed : null
Expand All @@ -1636,7 +1650,8 @@ window.__ModuleLoader__.load({

/** The chip title: the label this surface set, else the captured title, plus a dot while dirty. */
function EditorTitle(props) {
const info = props.useTabInfo()
const useTabInfo = tabInfoHookOf(props)
const info = useTabInfo !== null ? useTabInfo() : null
const tab = info.tab
const state = React.useSyncExternalStore(subscribeTabState, () => tabStateOf(tab.id))
const text = state.label === '' ? tab.title : state.label
Expand Down
2 changes: 1 addition & 1 deletion packages/dsh-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsh-editor",
"version": "0.1.0-alpha.14",
"version": "0.1.0-alpha.15",
"description": "Editor: the tab type for text and code - a vendored CodeMirror 6 fetched lazily - with create-on-save inside the session workspace through this package's own authenticated routes. Markdown is claimed too, and hands off to the shipped preview.",
"type": "module",
"main": "lib/index.js",
Expand Down
18 changes: 16 additions & 2 deletions packages/dsh-gittree/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ window.__ModuleLoader__.load({
const FILE_PREFIX = 'dsh-resource://file/'
const SESSION_SEGMENT = 'session/'
/** Version marker shown on the tool bar so a freshly loaded bundle is easy to verify. */
const PLUGIN_VERSION = '0.1.0-alpha.5'
const PLUGIN_VERSION = '0.1.0-alpha.6'
/** The keyed seats every tab type occupies. */
const TAB_SLOT = 'sidebar.right.pane.tab'
const TITLE_SLOT = 'sidebar.right.pane.tab.title'
Expand Down Expand Up @@ -816,9 +816,23 @@ window.__ModuleLoader__.load({
* while its token is the newest - so a re-render can never cancel an in-flight
* request, and two racing answers cannot overwrite each other.
*/
/**
* The pane seat's tab-info hook, whichever shape it arrived in: `useTabInfo`
* (the prop the 0.2.0 seat handed a body) or `hooks.tabInfo` (the hook the
* 0.2.1+ seat declares in its inject). A seat that gives neither yields null,
* which this body already treats as "this pane has no tab".
*/
function tabInfoHookOf(props) {
if (!props) return null
if (typeof props.useTabInfo === 'function') return props.useTabInfo
if (props.hooks && typeof props.hooks.tabInfo === 'function') return props.hooks.tabInfo
return null
}

function GitTreeView(props) {
const sessionId = typeof props.sessionId === 'string' ? props.sessionId : ''
const info = typeof props.useTabInfo === 'function' ? props.useTabInfo() : null
const useTabInfo = tabInfoHookOf(props)
const info = useTabInfo !== null ? useTabInfo() : null
const tabActions = info && info.tab && info.tab.actions ? info.tab.actions : null

const [summary, setSummary] = useState({ phase: 'loading', data: null, error: null })
Expand Down
2 changes: 1 addition & 1 deletion packages/dsh-gittree/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsh-gittree",
"version": "0.1.0-alpha.5",
"version": "0.1.0-alpha.6",
"description": "History: a read-only tab showing the workspace's commit graph, each commit's message and the files it touched. Three read-only routes spawn `git` with argv arrays under a pinned env; nothing here can write, stage or check out.",
"type": "module",
"main": "lib/index.js",
Expand Down
22 changes: 18 additions & 4 deletions packages/dsh-image/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ window.__ModuleLoader__.load({
/** The tab kind this package owns. */
const KIND = 'image'
/** Version marker shown in the toolbar, so a loaded bundle is easy to verify. */
const PLUGIN_VERSION = '0.1.0-alpha.2'
const PLUGIN_VERSION = '0.1.0-alpha.3'
/** Address grammar owned by @deepseek-ai/dsh-util-workspace-path. */
const FILE_PREFIX = 'dsh-resource://file/'
const SESSION_SEGMENT = 'session/'
Expand Down Expand Up @@ -424,10 +424,24 @@ window.__ModuleLoader__.load({
}

/** The tab information a pane body was handed, or null when it has none. */
function tabInfoNow(props) {
if (!props || typeof props.useTabInfo !== 'function') return null
/**
* The pane seat's tab-info hook, whichever shape it arrived in: `useTabInfo`
* (the prop the 0.2.0 seat handed a body) or `hooks.tabInfo` (the hook the
* 0.2.1+ seat declares in its inject). A seat that gives neither yields null,
* which every body already treats as "this pane has no tab".
*/
function tabInfoHookOf(props) {
if (!props) return null
if (typeof props.useTabInfo === 'function') return props.useTabInfo
if (props.hooks && typeof props.hooks.tabInfo === 'function') return props.hooks.tabInfo
return null
}

function tabInfoNow(props) {
const useTabInfo = tabInfoHookOf(props)
if (useTabInfo === null) return null
try {
const info = props.useTabInfo()
const info = useTabInfo()
return info && info.tab ? info : null
} catch (err) {
return null
Expand Down
2 changes: 1 addition & 1 deletion packages/dsh-image/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsh-image",
"version": "0.1.0-alpha.2",
"version": "0.1.0-alpha.3",
"description": "Image: a viewer tab for PNG/JPEG/GIF/WebP/AVIF/BMP/ICO/SVG/TIFF that fits the pane on open, zooms by moving the LAYOUT (never a transform), pans by drag and reads the pixel under the pointer. Client-only: the bytes come from the harness's own `remote.workspaceFiles`.",
"type": "module",
"main": "lib/index.js",
Expand Down
22 changes: 18 additions & 4 deletions packages/dsh-pdf/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ window.__ModuleLoader__.load({
/** The address shape a page-address tab is opened with. */
const PAGE_PREFIX = 'sidebar://'
/** Version marker shown in the toolbar, so a loaded bundle is easy to verify. */
const PLUGIN_VERSION = '0.1.0-alpha.9'
const PLUGIN_VERSION = '0.1.0-alpha.10'
/** Keep in sync with lib/index.js. */
const API_ROOT = '/api/dsh-pdf'
const FILE_ROUTE = API_ROOT + '/file'
Expand Down Expand Up @@ -443,10 +443,24 @@ window.__ModuleLoader__.load({
}

/** The tab information a pane body was handed, or null when it has none. */
function tabInfoNow(props) {
if (!props || typeof props.useTabInfo !== 'function') return null
/**
* The pane seat's tab-info hook, whichever shape it arrived in: `useTabInfo`
* (the prop the 0.2.0 seat handed a body) or `hooks.tabInfo` (the hook the
* 0.2.1+ seat declares in its inject). A seat that gives neither yields null,
* which every body already treats as "this pane has no tab".
*/
function tabInfoHookOf(props) {
if (!props) return null
if (typeof props.useTabInfo === 'function') return props.useTabInfo
if (props.hooks && typeof props.hooks.tabInfo === 'function') return props.hooks.tabInfo
return null
}

function tabInfoNow(props) {
const useTabInfo = tabInfoHookOf(props)
if (useTabInfo === null) return null
try {
const info = props.useTabInfo()
const info = useTabInfo()
return info && info.tab ? info : null
} catch (err) {
return null
Expand Down
2 changes: 1 addition & 1 deletion packages/dsh-pdf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsh-pdf",
"version": "0.1.0-alpha.9",
"version": "0.1.0-alpha.10",
"description": "PDF: five `pdf_*` tools (info, read, find, render, scan) over a vendored pdf.js, plus the reader tab (zoom, search, thumbnails, outline) and a workspace index. Read-only, with extraction in a child process that never evaluates a document's JavaScript.",
"type": "module",
"main": "lib/index.js",
Expand Down
22 changes: 18 additions & 4 deletions packages/dsh-video/lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ window.__ModuleLoader__.load({
/** The tab kind this package owns. */
const KIND = 'video'
/** Version marker shown in the toolbar, so a loaded bundle is easy to verify. */
const PLUGIN_VERSION = '0.1.0-alpha.2'
const PLUGIN_VERSION = '0.1.0-alpha.3'
/** Address grammar owned by @deepseek-ai/dsh-util-workspace-path. */
const FILE_PREFIX = 'dsh-resource://file/'
const SESSION_SEGMENT = 'session/'
Expand Down Expand Up @@ -302,10 +302,24 @@ window.__ModuleLoader__.load({
// The tab's own props
// ---------------------------------------------------------------------
/** The `useTabInfo` result, however the seat passed it. */
function tabInfoNow(props) {
if (!props || typeof props.useTabInfo !== 'function') return null
/**
* The pane seat's tab-info hook, whichever shape it arrived in: `useTabInfo`
* (the prop the 0.2.0 seat handed a body) or `hooks.tabInfo` (the hook the
* 0.2.1+ seat declares in its inject). A seat that gives neither yields null,
* which every body already treats as "this pane has no tab".
*/
function tabInfoHookOf(props) {
if (!props) return null
if (typeof props.useTabInfo === 'function') return props.useTabInfo
if (props.hooks && typeof props.hooks.tabInfo === 'function') return props.hooks.tabInfo
return null
}

function tabInfoNow(props) {
const useTabInfo = tabInfoHookOf(props)
if (useTabInfo === null) return null
try {
return props.useTabInfo()
return useTabInfo()
} catch (err) {
return null
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dsh-video/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dsh-video",
"version": "0.1.0-alpha.2",
"version": "0.1.0-alpha.3",
"description": "Video: a player tab for MP4/MOV/WebM/MKV/AVI/WMV/FLV/OGV/TS/3GP that fits the pane, with the ffprobe facts, chapters as jump targets and one-click remux/convert. The bytes never enter the tab: the `<video>` is handed a URL to dsh-media's Range route.",
"type": "module",
"main": "lib/index.js",
Expand Down
Loading