File tree Expand file tree Collapse file tree
commands/src/commands/knowledge Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,18 +93,15 @@ text 模式:
9393id: conn-xxx
9494name: my-collection
9595description: team docs
96- storeType: PLATFORM
9796```
9897
99- > 如果是 ` CUSTOM ` 存储,额外显示 ` ossRegion ` 和 ` ossBucket ` (注意:实测 getConnector 响应可能不返回 fileConnectorConfig,storeType 显示为 ` - ` )。
100-
10198quiet 模式:输出集合 ID。
10299
103100json 模式:返回 API 原始响应。
104101
105102** 注意事项**
106103
107- - 无特殊注意事项 。
104+ - getConnector 不返回 ` fileConnectorConfig ` ( ` storeType ` / ` regionId ` / ` bucketName ` ),这些字段仅在创建时通过请求体传入,查询时不可读回 。
108105
109106** 示例**
110107
Original file line number Diff line number Diff line change @@ -66,15 +66,8 @@ export default defineCommand({
6666 emitBare ( `id: ${ collection ?. connectorId ?? "-" } ` ) ;
6767 emitBare ( `name: ${ collection ?. connectorName ?? "-" } ` ) ;
6868 emitBare ( `description: ${ collection ?. description ?? "-" } ` ) ;
69- const storeType = collection ?. fileConnectorConfig ?. storeType ;
70- emitBare ( `storeType: ${ storeType ?? "-" } ` ) ;
71- if ( storeType === "CUSTOM" ) {
72- // Defensive branch: live-verified getConnector responses do NOT echo
73- // fileConnectorConfig at all (storeType prints "-"); kept in case the
74- // server starts returning it. Field names follow the create contract.
75- emitBare ( ` ossRegion: ${ collection ?. fileConnectorConfig ?. regionId ?? "-" } ` ) ;
76- emitBare ( ` ossBucket: ${ collection ?. fileConnectorConfig ?. bucketName ?? "-" } ` ) ;
77- }
69+ // getConnector does not return fileConnectorConfig (storeType/regionId/bucketName);
70+ // these fields are only available on the create request body.
7871 return ;
7972 }
8073 emitResult ( response , format ) ;
Original file line number Diff line number Diff line change @@ -324,19 +324,12 @@ export interface RagListFileData {
324324export type RagListFileResponse = RagConnectorResponse < RagListFileData > ;
325325export type RagDescribeFileResponse = RagConnectorResponse < RagDataCenterFile > ;
326326
327- /** POST addConnector / getConnector */
327+ /** POST addConnector response / getConnector response — server does NOT echo fileConnectorConfig (live-verified) */
328328export interface RagConnectorInfo {
329329 connectorId ?: string ;
330330 connectorName ?: string ;
331331 description ?: string ;
332332 connectorType ?: string ;
333- fileConnectorConfig ?: {
334- storeType ?: string ;
335- /** CUSTOM request fields: regionId/bucketName (per add-connector.md, live-verified) */
336- regionId ?: string ;
337- bucketName ?: string ;
338- [ key : string ] : unknown ;
339- } ;
340333 [ key : string ] : unknown ;
341334}
342335export type RagAddConnectorResponse = RagConnectorResponse < RagConnectorInfo > ;
You can’t perform that action at this time.
0 commit comments