Skip to content

Commit a55b70a

Browse files
feat(vscode,main.rs): Add VSCode launch config and require scope in JSON
1 parent 579c607 commit a55b70a

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "(Windows) Launch",
6+
"type": "cppvsdbg",
7+
"request": "launch",
8+
"program": "${workspaceRoot}/target/debug/git-cmt-rs.exe",
9+
"args": [],
10+
"stopAtEntry": false,
11+
"cwd": "${workspaceFolder}",
12+
"environment": [],
13+
"console": "externalTerminal"
14+
}
15+
]
16+
}

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ Return ONLY valid JSON, no other text."#;
111111
let schema = serde_json::json!({
112112
"type": "object",
113113
"additionalProperties": false,
114-
"required": ["type", "message"],
114+
"required": ["type", "scope", "message"], // <- include "scope"
115115
"properties": {
116116
"type": { "type": "string", "enum": ["feat","fix","docs","style","refactor","test","chore"] },
117-
"scope": { "type": "string" },
117+
"scope": { "type": "string" }, // model can output "" if nothing fits
118118
"message":{ "type": "string", "maxLength": 50 }
119119
}
120120
});

0 commit comments

Comments
 (0)