dsh-requirement-dev-workbench 4.5.10 → 4.5.11
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 +5 -0
- package/dsh/index.js +37 -2
- package/lib/client.js +5 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ AI Native 工作台(包名 `dsh-requirement-dev-workbench`)的版本变更
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## v4.5.11 — 2026-11-20
|
|
9
|
+
|
|
10
|
+
- **模块工作区真的决定读哪张表**:以前只改了目录,表还停在当前项目上;现在模块没贴链接时,会去它自己的目录里找需求源。
|
|
11
|
+
- **目录里没配需求源时说清楚**:不再笼统报「项目里没配」,而是告诉你「这个模块的工作区是 X,那里没有配需求源」,并提示可以点 🔗 直接贴链接。
|
|
12
|
+
|
|
8
13
|
## v4.5.10 — 2026-11-19
|
|
9
14
|
|
|
10
15
|
- **每个模块的工作区真正各自独立**:左栏模块名旁新增 📁,改的是这个模块自己的项目目录,别的模块一点不动;留空才跟随当前项目。
|
package/dsh/index.js
CHANGED
|
@@ -641,7 +641,7 @@ export async function listTables(config, settings, view = null) {
|
|
|
641
641
|
export async function findTable(config, settings, key, view = null) {
|
|
642
642
|
const { tables, requirementConfig, taskConfig } = await listTables(config, settings, view)
|
|
643
643
|
const wanted = String(key ?? '').trim()
|
|
644
|
-
const module = wanted ? (view?.modules ?? []).find((item) => item.key === wanted) ?? null : null
|
|
644
|
+
const module = wanted ? (view?.modules ?? []).find((item) => item.key === wanted || (item.source && `module:${item.key}` === wanted)) ?? null : null
|
|
645
645
|
// 模块自带数据源:先按模块找,找到就用它自己的表和项目,不受当前项目换了影响。
|
|
646
646
|
let fromModule = module ? moduleTable(module, { identity: config.identity, configPath: requirementConfig }) : null
|
|
647
647
|
if (fromModule && !fromModule.baseToken) fromModule = null
|
|
@@ -651,6 +651,26 @@ export async function findTable(config, settings, key, view = null) {
|
|
|
651
651
|
pool.find((table) => table.sourceName === wanted) ??
|
|
652
652
|
pool.find((table) => table.tableId === wanted)
|
|
653
653
|
: null
|
|
654
|
+
// 模块自己没配链接、但它记着另一个项目目录:那个目录里配的表就是这个模块的表
|
|
655
|
+
// (否则「每个模块一个工作区」只改了目录,表还停留在当前项目上)。
|
|
656
|
+
if (!found && module) {
|
|
657
|
+
const ownDir = String(module.projectDir ?? '').trim()
|
|
658
|
+
const currentDir = String(settings.projectDir ?? '').trim()
|
|
659
|
+
// 没配链接、且(目录不同 或 传的是自己的模块 key)时才去模块自己的目录里找表。
|
|
660
|
+
const byModuleKey = `module:${module.key}` === wanted || module.key === wanted
|
|
661
|
+
if (ownDir && (byModuleKey || ownDir !== currentDir) && !module.source) {
|
|
662
|
+
const scoped = await listTables(config, { ...settings, projectDir: ownDir }, view)
|
|
663
|
+
if (scoped.tables.length) {
|
|
664
|
+
// 只在「这个目录里确实有一张和这个模块对得上的表」时才换过去:
|
|
665
|
+
// 拿别人的表顶上,会让模块静默显示别的项目的需求。
|
|
666
|
+
const own = scoped.tables.find((table) => table.key === wanted) ??
|
|
667
|
+
scoped.tables.find((table) => table.sourceName === wanted) ??
|
|
668
|
+
scoped.tables.find((table) => table.tableId === wanted) ??
|
|
669
|
+
(scoped.tables.length === 1 ? scoped.tables[0] : null)
|
|
670
|
+
if (own) return { table: own, tables: scoped.tables, module, requirementConfig: scoped.requirementConfig, taskConfig: scoped.taskConfig }
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
654
674
|
return { table: wanted ? found ?? null : tables[0] ?? null, tables, module, requirementConfig, taskConfig }
|
|
655
675
|
}
|
|
656
676
|
|
|
@@ -3161,7 +3181,22 @@ export function apply(ctx, config) {
|
|
|
3161
3181
|
if (!tableKey) return sendJson(res, 200, await fetchRequirements(config, settings))
|
|
3162
3182
|
const fresh = url.searchParams.get('fresh') === '1'
|
|
3163
3183
|
const { table, tables } = await findTable(config, settings, tableKey, await readView(config))
|
|
3164
|
-
if (!table)
|
|
3184
|
+
if (!table) {
|
|
3185
|
+
// 这个模块记着自己的项目目录,但那个目录里还没配需求源:别报「全局没配置」把人挡在门外,
|
|
3186
|
+
// 说清楚是哪个目录缺东西,并给出去处(点 🔗 直接配链接)。
|
|
3187
|
+
const view = await readView(config)
|
|
3188
|
+
const module = view.modules.find((item) => item.key === tableKey) ?? null
|
|
3189
|
+
const ownDir = String(module?.projectDir ?? '').trim()
|
|
3190
|
+
if (ownDir && !module?.source) {
|
|
3191
|
+
return sendJson(res, 200, {
|
|
3192
|
+
configured: false,
|
|
3193
|
+
items: [],
|
|
3194
|
+
message: `这个模块的工作区是「${ownDir}」,但那个目录里没有配需求源(sino-skill-config.json)。可以点模块名旁的 🔗 直接给这个模块贴一条多维表格链接(只影响本模块)。`,
|
|
3195
|
+
workspaceDir: ownDir,
|
|
3196
|
+
})
|
|
3197
|
+
}
|
|
3198
|
+
return sendJson(res, 200, { configured: false, items: [], message: '没有找到这张表(项目里还没配到)' })
|
|
3199
|
+
}
|
|
3165
3200
|
const payload = await fetchTableRecords(config, table, { fresh })
|
|
3166
3201
|
if (!payload.ok) {
|
|
3167
3202
|
return sendJson(res, 200, { configured: true, items: [], source: publicTable(table), error: payload.error, detail: payload.detail, command: payload.command })
|
package/lib/client.js
CHANGED
|
@@ -13,7 +13,7 @@ window.__ModuleLoader__.load({
|
|
|
13
13
|
const { useCallback, useEffect, useMemo, useRef, useState } = React
|
|
14
14
|
|
|
15
15
|
const API = '/api/requirement-dev-workbench'
|
|
16
|
-
const WORKBENCH_VERSION = '4.5.
|
|
16
|
+
const WORKBENCH_VERSION = '4.5.11'
|
|
17
17
|
const STYLE_ID = 'rdw-business-panel-styles'
|
|
18
18
|
|
|
19
19
|
const CSS = `
|
|
@@ -1033,7 +1033,8 @@ window.__ModuleLoader__.load({
|
|
|
1033
1033
|
* 空态文案(v4.2):以前读到 0 条也写「还没有读到」,看着像拉取失败。
|
|
1034
1034
|
* 现在分清两件事 —— 「表本来就是空的」和「有数据但被筛选掉了」,并按 kind 说需求还是任务。
|
|
1035
1035
|
*/
|
|
1036
|
-
function emptyTableText(table, hasRecords) {
|
|
1036
|
+
function emptyTableText(table, hasRecords, message = '') {
|
|
1037
|
+
if (message) return message
|
|
1037
1038
|
const noun = table?.kind === 'task' ? '任务' : '需求'
|
|
1038
1039
|
if (hasRecords) return `当前筛选下没有${noun}`
|
|
1039
1040
|
return `这张表当前 0 条${noun}(已成功读取,表内暂无记录)`
|
|
@@ -1689,7 +1690,7 @@ window.__ModuleLoader__.load({
|
|
|
1689
1690
|
),
|
|
1690
1691
|
mode === 'list'
|
|
1691
1692
|
? !filtered.length && !failure && !loading
|
|
1692
|
-
? h('div', { className: 'rdw-empty' }, emptyTableText(table, items.length > 0))
|
|
1693
|
+
? h('div', { className: 'rdw-empty' }, emptyTableText(table, items.length > 0, data?.configured ? '' : (data?.message ?? '')))
|
|
1693
1694
|
: h(
|
|
1694
1695
|
'div',
|
|
1695
1696
|
{ className: 'rdw-tablewrap' },
|
|
@@ -1818,7 +1819,7 @@ window.__ModuleLoader__.load({
|
|
|
1818
1819
|
)
|
|
1819
1820
|
}),
|
|
1820
1821
|
)
|
|
1821
|
-
: h('div', { className: 'rdw-empty' }, emptyTableText(table, items.length > 0))
|
|
1822
|
+
: h('div', { className: 'rdw-empty' }, emptyTableText(table, items.length > 0, data?.configured ? '' : (data?.message ?? '')))
|
|
1822
1823
|
: null,
|
|
1823
1824
|
mode === 'progress'
|
|
1824
1825
|
? h(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-requirement-dev-workbench",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "AI Native 工作台:把「拿任务 → 开发 → 验收」串成一条流水线。跨多张飞书多维表格看开发任务与进度,拉取飞书文档信息,用专家/专家团跑完整流程(需求分析 → 代码开发 → 代码评审 → QA 测试),选中本地项目后一键生成开发指令,并可浏览项目/全局 skill 与开发规范。模块可扩展。",
|