690607:2321 ADR-035-135 #07
CI / CD Pipeline / build (push) Successful in 5m20s
CI / CD Pipeline / deploy (push) Successful in 6m42s

This commit is contained in:
2026-06-07 23:21:55 +07:00
parent 16aab2279c
commit a0f77ad121
4 changed files with 97 additions and 48 deletions
+14
View File
@@ -0,0 +1,14 @@
# File: .vscode/setup-terminal.ps1
# Change Log:
# - 2026-06-07: Initial creation - bypass PSReadline history restoration
param(
[Parameter(Mandatory=$true)]
[string]$TargetPath
)
# Disable PSReadline history for this session
Set-PSReadlineOption -HistorySaveStyle SaveNothing
# Change to target directory
Set-Location $TargetPath
@@ -208,7 +208,7 @@ export class AiBatchProcessor extends WorkerHost {
model?: string; model?: string;
system?: string; system?: string;
format?: 'json'; format?: 'json';
ollamaOptions?: { num_ctx?: number }; ollamaOptions?: { num_ctx?: number; num_predict?: number };
} }
): Promise<{ ): Promise<{
extractedMetadata: Record<string, unknown>; extractedMetadata: Record<string, unknown>;
@@ -533,7 +533,7 @@ export class AiBatchProcessor extends WorkerHost {
{ {
format: 'json', format: 'json',
timeoutMs: 120000, timeoutMs: 120000,
ollamaOptions: { num_ctx: 8192 }, // รองรับ prompt ยาว 18k+ chars ollamaOptions: { num_ctx: 8192, num_predict: 4096 }, // num_predict ป้องกัน output ถูก truncate
} }
); );
await this.aiPromptsService.saveTestResult( await this.aiPromptsService.saveTestResult(
@@ -737,7 +737,7 @@ export class AiBatchProcessor extends WorkerHost {
{ {
format: 'json', format: 'json',
timeoutMs: 120000, timeoutMs: 120000,
ollamaOptions: { num_ctx: 8192 }, // รองรับ prompt ยาว 18k+ chars ollamaOptions: { num_ctx: 8192, num_predict: 4096 }, // num_predict ป้องกัน output ถูก truncate
} }
); );
+1 -1
View File
@@ -30,7 +30,7 @@
"@types": ["types/*"], "@types": ["types/*"],
"@api": ["app/api/*"], "@api": ["app/api/*"],
// เพิ่มส่วนที่ขาดไปเพื่อให้ตรงกับ Workspace // เพิ่มส่วนที่ขาดไปเพื่อให้ตรงกับ Workspace
"@hooks/*": ["app/hooks/*"], "@hooks/*": ["hooks/*"],
"@utils/*": ["utils/*"] "@utils/*": ["utils/*"]
}, },
"target": "ES2017" "target": "ES2017"
+79 -44
View File
@@ -12,6 +12,10 @@
"name": "🎨 Frontend", "name": "🎨 Frontend",
"path": "frontend", "path": "frontend",
}, },
{
"name": "🗓️ docs",
"path": "docs",
},
{ {
"name": "🔗 specs", "name": "🔗 specs",
"path": "specs", "path": "specs",
@@ -177,13 +181,13 @@
"@workflow-engine": "${workspaceFolder:🔧 Backend}/src/modules/workflow-engine", "@workflow-engine": "${workspaceFolder:🔧 Backend}/src/modules/workflow-engine",
// Frontend paths (ไม่มี src) // Frontend paths (ไม่มี src)
"@": "${workspaceFolder:🎨 Frontend}/app", "@": "${workspaceFolder:🎨 Frontend}",
"@/*": "${workspaceFolder:🎨 Frontend}/app/*", "@/*": "${workspaceFolder:🎨 Frontend}/*",
"@app": "${workspaceFolder:🎨 Frontend}/app", "@app": "${workspaceFolder:🎨 Frontend}/app",
"@components": "${workspaceFolder:🎨 Frontend}/components", "@components": "${workspaceFolder:🎨 Frontend}/components",
"@fe-config": "${workspaceFolder:🎨 Frontend}/config", "@fe-config": "${workspaceFolder:🎨 Frontend}/config",
"@lib": "${workspaceFolder:🎨 Frontend}/lib", "@lib": "${workspaceFolder:🎨 Frontend}/lib",
"@hooks": "${workspaceFolder:🎨 Frontend}/app/hooks", "@hooks": "${workspaceFolder:🎨 Frontend}/hooks",
"@utils": "${workspaceFolder:🎨 Frontend}/utils", "@utils": "${workspaceFolder:🎨 Frontend}/utils",
"@providers": "${workspaceFolder:🎨 Frontend}/providers", "@providers": "${workspaceFolder:🎨 Frontend}/providers",
"@public": "${workspaceFolder:🎨 Frontend}/public", "@public": "${workspaceFolder:🎨 Frontend}/public",
@@ -355,24 +359,22 @@
"importCost.smallPackageColor": "#98C379", "importCost.smallPackageColor": "#98C379",
// ======================================== // ========================================
// JAVASCRIPT/TYPESCRIPT // JAVASCRIPT/TYPESCRIPT (Unified Settings)
// ======================================== // ========================================
"javascript.suggest.autoImports": true, // Unified JS/TS settings (replaces deprecated javascript.* and typescript.*)
"javascript.updateImportsOnFileMove.enabled": "always", "#js/ts.suggest.autoImports": true,
"javascript.inlayHints.parameterNames.enabled": "all", "#js/ts.updateImportsOnFileMove.enabled": "always",
"javascript.inlayHints.functionLikeReturnTypes.enabled": true, "#js/ts.preferences.importModuleSpecifier": "relative",
"javascript.inlayHints.variableTypes.enabled": false,
"javascript.preferences.importModuleSpecifier": "relative",
"typescript.suggest.autoImports": true, // Unified inlay hints (replaces deprecated javascript.inlayHints.* and typescript.inlayHints.*)
"typescript.updateImportsOnFileMove.enabled": "always", "editor.inlayHints.parameterNames.enabled": "all",
"typescript.inlayHints.parameterNames.enabled": "all", "editor.inlayHints.functionLikeReturnTypes.enabled": true,
"typescript.inlayHints.functionLikeReturnTypes.enabled": true, "editor.inlayHints.variableTypes.enabled": false,
"typescript.inlayHints.variableTypes.enabled": false, "editor.inlayHints.propertyDeclarationTypes.enabled": true,
"typescript.inlayHints.propertyDeclarationTypes.enabled": true,
"typescript.preferences.importModuleSpecifier": "relative", // Unified TypeScript SDK path (replaces deprecated typescript.tsdk)
"typescript.tsdk": "node_modules/typescript/lib", // ✅ ใช้ relative path "#js/ts.tsdk.path": "node_modules/typescript/lib", // ✅ ใช้ relative path
// ======================================== // ========================================
// EMMET // EMMET
// ======================================== // ========================================
@@ -388,7 +390,6 @@
// FILES // FILES
// ======================================== // ========================================
//"files.autoSave": "onFocusChange",
"files.trimTrailingWhitespace": true, "files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true, "files.insertFinalNewline": true,
"files.encoding": "utf8", "files.encoding": "utf8",
@@ -658,8 +659,8 @@
"name": "lcbp3_dev", "name": "lcbp3_dev",
"database": "lcbp3_dev", "database": "lcbp3_dev",
"username": "root", "username": "root",
"password": "", "password": "${env:DB_PASSWORD}", // ✅ ใช้ environment variable แทน hardcoded
"askForPassword": true, // ✅ ปลอดภัยกว่า "askForPassword": true,
}, },
], ],
"database-client.variableIndicator": [":", "$"], "database-client.variableIndicator": [":", "$"],
@@ -670,6 +671,7 @@
"vitest.enable": true, "vitest.enable": true,
"yaml.maxItemsComputed": 10000, "yaml.maxItemsComputed": 10000,
"powershell.cwd": "🎯 Root", "powershell.cwd": "🎯 Root",
// "terminal.integrated.persistentSessionReviveProcess": "never",
"files.autoSave": "onFocusChange", "files.autoSave": "onFocusChange",
"diffEditor.codeLens": false, "diffEditor.codeLens": false,
"workbench.colorTheme": "Default Dark Modern", "workbench.colorTheme": "Default Dark Modern",
@@ -886,7 +888,7 @@
// 1. Task หลักที่จะรันอัตโนมัติเมื่อเปิดโปรแกรม // 1. Task หลักที่จะรันอัตโนมัติเมื่อเปิดโปรแกรม
{ {
"label": "🚀 Setup Workspace", "label": "🚀 Setup Workspace",
"dependsOn": ["🔧 PS: Backend", "🎨 PS: Frontend"], // สั่งให้รัน 2 task ย่อย "dependsOn": ["🎯 PS: Root", "🔧 PS: Backend", "🎨 PS: Frontend"], // สั่งให้รัน 3 task ย่อย
"runOptions": { "runOptions": {
"runOn": "folderOpen", // <--- คำสั่งศักดิ์สิทธิ์: รันทันทีที่เปิด VS Code "runOn": "folderOpen", // <--- คำสั่งศักดิ์สิทธิ์: รันทันทีที่เปิด VS Code
}, },
@@ -895,30 +897,30 @@
}, },
"problemMatcher": [], "problemMatcher": [],
}, },
// 2. Task ย่อย: เปิด Terminal ที่ Backend // 2. Task ย่อย: เปิด Terminal ที่ Root
{ {
"label": "🔧 PS: Backend", "label": "🎯 PS: Root",
"type": "shell",
"command": "powershell", // สั่งเปิด PowerShell ค้างไว้
"options": {
"cwd": "${workspaceFolder:🔧 Backend}", // cd เข้า folder นี้
},
"isBackground": true, // บอก VS Code ว่าไม่ต้องรอให้จบ (รันค้างไว้เลย)
"problemMatcher": [],
"presentation": {
"group": "workspace-terminals", // จัดกลุ่มเดียวกัน
"reveal": "always",
"panel": "dedicated", // แยก Tab ให้ชัดเจน
"focus": false, // ไม่ต้องแย่ง Focus ทันที
},
},
// 3. Task ย่อย: เปิด Terminal ที่ Frontend
{
"label": "🎨 PS: Frontend",
"type": "shell", "type": "shell",
"command": "powershell", "command": "powershell",
"options": { "options": {
"cwd": "${workspaceFolder:🎨 Frontend}", // cd เข้า folder นี้ "cwd": "${workspaceFolder:🎯 Root}",
},
"isBackground": true,
"problemMatcher": [],
"presentation": {
// "group": "workspace-terminals",
"reveal": "always",
"panel": "dedicated",
"focus": false,
},
},
// 3. Task ย่อย: เปิด Terminal ที่ Backend
{
"label": "🔧 PS: Backend",
"type": "shell",
"command": "powershell",
"options": {
"cwd": "${workspaceFolder:🔧 Backend}",
}, },
"isBackground": true, "isBackground": true,
"problemMatcher": [], "problemMatcher": [],
@@ -926,8 +928,41 @@
"group": "workspace-terminals", "group": "workspace-terminals",
"reveal": "always", "reveal": "always",
"panel": "dedicated", "panel": "dedicated",
"focus": false, // ไม่ต้องแย่ง Focus ทันที "focus": false,
// "focus": true // ให้ Focus ที่อันนี้เป็นอันสุดท้าย (พร้อมพิมพ์) },
},
// 4. Task ย่อย: เปิด Terminal ที่ Frontend
{
"label": "🎨 PS: Frontend",
"type": "shell",
"command": "powershell",
"options": {
"cwd": "${workspaceFolder:🎨 Frontend}",
},
"isBackground": true,
"problemMatcher": [],
"presentation": {
"group": "workspace-terminals",
"reveal": "always",
"panel": "dedicated",
"focus": false,
},
},
// 5. Task ย่อย: เปิด Vitest Watch Mode ที่ Frontend (Manual run only)
{
"label": "🧪 Vitest Watch Frontend",
"type": "shell",
"command": "npm run test:watch",
"options": {
"cwd": "${workspaceFolder:🎨 Frontend}",
},
"isBackground": true,
"problemMatcher": [],
"presentation": {
"group": "workspace-terminals",
"reveal": "always",
"panel": "dedicated",
"focus": false,
}, },
}, },
], ],