Skip to content

Commit 3bee31d

Browse files
committed
Add C++ auto-include advisor prompt and implement stack and queue operations
- Created a `.clangd` configuration file to enforce strict diagnostics for unused and missing includes. - Added a new prompt for a C++ Auto Include Advisor to guide users in configuring VS Code for automatic header inclusion. - Implemented a solution for validating stack sequences in `1.cpp` under the noob92 practice directory. - Created a template for queue operations in `1.cpp` under the noob93 practice directory.
1 parent 5080a9f commit 3bee31d

6 files changed

Lines changed: 1982 additions & 1861 deletions

File tree

.clangd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Diagnostics:
2+
UnusedIncludes: Strict
3+
MissingIncludes: Strict
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
description: "Recommend and configure VS Code C++ auto-include workflow with caveats"
3+
name: "C++ Auto Include Advisor"
4+
argument-hint: "project type; toolchain; constraints; current issue"
5+
agent: "agent"
6+
---
7+
Help configure C++ development in VS Code so required headers are inserted or suggested while coding.
8+
9+
Use the slash-command argument as context in this format:
10+
`project type; toolchain; constraints; current issue`
11+
12+
Task:
13+
1. Recommend practical implementation paths in priority order:
14+
- `clangd` code actions and include cleanup
15+
- VS Code C/C++ extension IntelliSense and quick fixes
16+
- `clang-tidy` and/or IWYU for stricter include management
17+
2. For each path, provide:
18+
- what it can and cannot automate
19+
- exact setup steps in VS Code
20+
- required extensions and key settings
21+
- quick verification steps
22+
3. Choose one best default path for the provided context and explain why.
23+
4. Provide a caution checklist covering:
24+
- transitive include traps
25+
- missing or wrong include suggestions
26+
- `bits/stdc++.h` portability limits
27+
- GCC, Clang, and MSVC differences
28+
- indexing and performance costs
29+
5. Provide copy-paste config snippets:
30+
- `.vscode/settings.json`
31+
- optional `.clangd` or `clang-tidy` config
32+
6. End with a troubleshooting table with columns:
33+
- symptom
34+
- likely cause
35+
- fix
36+
37+
Output format:
38+
- Section 1: Recommended approach
39+
- Section 2: Setup steps
40+
- Section 3: Caveats and limits
41+
- Section 4: Verification checklist
42+
- Section 5: Troubleshooting
43+
44+
Rules:
45+
- Be explicit about tradeoffs; do not imply perfect auto-include.
46+
- Respond in Simplified Chinese unless the user asks for another language.
47+
- Prefer portable headers by default.
48+
- For competitive-programming context, `bits/stdc++.h` can be listed as an explicit optional shortcut, but always provide a portable alternative include set.
49+
- Keep commands and config snippets minimal and directly usable.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.vs
22
.vscode
33
.cursor
4+
.cache/
45
*.exe
5-
.cph
6+
.cph

0 commit comments

Comments
 (0)