Update ket qua AI
This commit is contained in:
parent
0a9c22268d
commit
9e187d8e89
|
|
@ -616,7 +616,10 @@ export default class LineConnection {
|
|||
return
|
||||
}
|
||||
if (script?.send_result || script?.sendResult) {
|
||||
const detectLog = await this.detectLogWithAI(this.outputALLScenario)
|
||||
let detectLog = await this.detectLogWithAI(this.outputALLScenario)
|
||||
if (typeof detectLog === 'string' && detectLog?.includes('[')) {
|
||||
detectLog = [...detectLog.matchAll(/"((?:\\.|[^"\\])*)"/g)].map(m => m[1])
|
||||
}
|
||||
const result = mapToLineFormat({
|
||||
lineNumber: this.config.lineNumber,
|
||||
inventory: this.config.inventory,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ type InputData = {
|
|||
lineNumber: number
|
||||
inventory: any
|
||||
latestScenario?: {
|
||||
detectAI?: DetectAI
|
||||
detectAI?: string | string[]
|
||||
}
|
||||
data?: any[]
|
||||
}
|
||||
|
|
@ -223,9 +223,10 @@ export function mapToLineFormat(input: InputData) {
|
|||
// // Mode (DPEL / DPELP)
|
||||
// const dataPlatform = input.data?.find((el) => el.command?.trim() === 'show platform')
|
||||
// const mode = dataPlatform && !dataPlatform.output?.includes('Incomplete') ? 'DPELP' : 'DPEL'
|
||||
|
||||
const detectAI: string | string[] | undefined = input.latestScenario?.detectAI
|
||||
// Issues
|
||||
const issues = Array.isArray(input.latestScenario?.detectAI) ? input.latestScenario?.detectAI : []
|
||||
const issues = Array.isArray(detectAI) ? detectAI : typeof detectAI === 'string' && detectAI?.includes('[') ? [...detectAI.matchAll(/"((?:\\.|[^"\\])*)"/g)]
|
||||
.map(m => m[1]) : []
|
||||
|
||||
// Issues
|
||||
const summary = ''
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
"extends": "@adonisjs/tsconfig/tsconfig.app.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./",
|
||||
"outDir": "./build"
|
||||
}
|
||||
}
|
||||
"outDir": "./build",
|
||||
},
|
||||
}
|
||||
Loading…
Reference in New Issue