Skip to content

Commit 4d8209f

Browse files
committed
feat: update Micro Codebase Export functionality and add new export commands
1 parent 39e81d6 commit 4d8209f

File tree

10 files changed

+842
-51
lines changed

10 files changed

+842
-51
lines changed

RELEASE-NOTES-1.0.2.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/changelog.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [2.0.1] - 2025-03-24
11+
12+
### Fixed
13+
- Improved method detection in Micro Codebase Export to eliminate false positives
14+
- Fixed class hierarchy detection to properly show inheritance relationships
15+
- Enhanced property detection to avoid capturing method calls as properties
16+
- Added better flow pattern detection for methods (error handling, async, conditionals)
17+
- Improved type information display for method parameters and return types
18+
- Added proper static member identification
19+
20+
## [2.0.0] - 2025-03-22
21+
22+
### Added
23+
- Micro Codebase Export feature - Condenses code files into a highly informative minimal representation
24+
- New commands: "Export Micro Codebase" and "Export Selected as Micro Codebase"
25+
- Specialized notation system for representing code structures in condensed form
26+
- Automatic detection of design patterns and critical code paths
27+
1028
## [1.0.2] - 2025-03-16
1129

1230
### Added

docs/usage.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Usage
22

3-
CodebaseMD provides two main commands to export your codebase to a Markdown file:
3+
CodebaseMD provides four main commands:
44

55
1. **Export All**: Export the entire codebase to a Markdown file
66
2. **Export Selected**: Export only the selected files or folders to a Markdown file
7+
3. **Export Micro Codebase**: Export a condensed version of the entire codebase
8+
4. **Export Selected as Micro Codebase**: Export a condensed version of selected files or folders
79

810
## Exporting the Entire Codebase
911

@@ -22,6 +24,63 @@ CodebaseMD provides two main commands to export your codebase to a Markdown file
2224
5. The extension will process only the selected files, still respecting ignore patterns
2325
6. Once complete, you will see a notification that the file was saved successfully
2426

27+
## Exporting Micro Codebase
28+
29+
The Micro Codebase export feature creates highly condensed representations of your code files, reducing size by approximately 95% while preserving essential structural information.
30+
31+
1. Open the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS)
32+
2. Type "CodebaseMD: Export Micro Codebase" and select it
33+
3. Choose a location to save the exported Markdown file
34+
4. The extension will analyze and condense all files in your workspace
35+
5. Once complete, you will see a notification that the file was saved successfully
36+
37+
## Exporting Selected Files as Micro Codebase
38+
39+
1. Select one or more files or folders in the Explorer view
40+
2. Right-click and select "CodebaseMD: Export Selected as Micro Codebase" from the context menu
41+
3. Choose a location to save the exported Markdown file
42+
4. The extension will analyze and condense only the selected files
43+
5. Once complete, you will see a notification that the file was saved successfully
44+
45+
## Understanding the Micro Codebase Format
46+
47+
The Micro Codebase export uses a specialized notation to represent code structures in a condensed format:
48+
49+
- File metadata is shown at the top (path, description, dependencies)
50+
- Export information summarizes what the file exposes (classes, interfaces, functions)
51+
- Components (classes, functions, etc.) use type and visibility indicators:
52+
- Type: C = Class, I = Interface, F = Function, V = Variable
53+
- Visibility: + = public, - = private, # = protected
54+
- Function parameters and return types are shown in abbreviated form
55+
- Important algorithms and flow patterns are highlighted
56+
- Design patterns detected in the code are listed at the bottom
57+
58+
Example:
59+
```
60+
// PATH: src/auth/UserManager.ts [TYPESCRIPT]
61+
// DESC: User authentication and session management
62+
// DEPS: ./models, ../utils, @auth/jwt
63+
64+
EXPORT [C:1, F:2]
65+
66+
C+ UserManager {
67+
// Handles user authentication and session tracking
68+
69+
F+ login(user:S, pass:S):Promise<UserSession>
70+
[FLOW: validate→authenticate→createSession]
71+
72+
F+ logout(id:S):void
73+
[FLOW: validateSession→destroyToken→clearCache]
74+
75+
F- validateCredentials(user:S, pass:S):Bool
76+
[ALG: PBKDF2]
77+
}
78+
79+
PATTERNS:
80+
- Singleton pattern
81+
- Promise chain pattern
82+
```
83+
2584
## Excluding Files from Content Export
2685

2786
You can exclude files from having their contents exported while still keeping them in the folder structure by using a `.codebaseignore` file:

package.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "codebase-md",
33
"displayName": "CodebaseMD",
44
"description": "Export your entire codebase or selected files as a Markdown file.",
5-
"version": "1.0.2",
5+
"version": "2.0.1",
66
"publisher": "alpha912",
77
"engines": {
88
"vscode": "^1.70.0"
@@ -12,7 +12,9 @@
1212
],
1313
"activationEvents": [
1414
"onCommand:codebaseMD.exportAll",
15-
"onCommand:codebaseMD.exportSelected"
15+
"onCommand:codebaseMD.exportSelected",
16+
"onCommand:codebaseMD.exportMicro",
17+
"onCommand:codebaseMD.exportMicroSelected"
1618
],
1719
"main": "./out/extension.js",
1820
"repository": {
@@ -30,6 +32,14 @@
3032
{
3133
"command": "codebaseMD.exportSelected",
3234
"title": "Export Selected as Markdown"
35+
},
36+
{
37+
"command": "codebaseMD.exportMicro",
38+
"title": "Export Micro Codebase"
39+
},
40+
{
41+
"command": "codebaseMD.exportMicroSelected",
42+
"title": "Export Selected as Micro Codebase"
3343
}
3444
],
3545
"menus": {
@@ -38,6 +48,11 @@
3848
"command": "codebaseMD.exportSelected",
3949
"when": "explorerResourceIsFolder || resourceFilename",
4050
"group": "navigation"
51+
},
52+
{
53+
"command": "codebaseMD.exportMicroSelected",
54+
"when": "explorerResourceIsFolder || resourceFilename",
55+
"group": "navigation"
4156
}
4257
]
4358
}

releases/RELEASE-NOTES-2.0.0.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# CodebaseMD v2.0.0 Release Notes
2+
3+
We're excited to announce the release of CodebaseMD v2.0.0, featuring a major new capability: Micro Codebase Export!
4+
5+
## New Features
6+
7+
### Micro Codebase Export
8+
9+
This release introduces a powerful new feature that enables you to create highly condensed, yet informative representations of your code files. The Micro Codebase export reduces code size by approximately 95% while preserving essential structural and functional information.
10+
11+
#### Key Benefits
12+
13+
- **Size Reduction**: Condenses large files (2000+ lines) down to approximately 100 lines
14+
- **Structural Preservation**: Maintains class hierarchies, function relationships, and module dependencies
15+
- **Information Density**: Uses a specialized notation system to maximize information content
16+
- **Pattern Recognition**: Automatically identifies and highlights common design patterns in your code
17+
18+
#### How It Works
19+
20+
The Micro Codebase export applies a sophisticated code condensation algorithm that:
21+
22+
1. Analyzes your code's structure, including classes, functions, dependencies, and patterns
23+
2. Prioritizes information based on visibility, usage, and importance
24+
3. Creates a condensed representation using specialized notation
25+
4. Generates a markdown file with the micro representation of your codebase
26+
27+
#### How to Use Micro Codebase Export
28+
29+
**For the entire codebase:**
30+
1. Open the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS)
31+
2. Type "CodebaseMD: Export Micro Codebase" and select it
32+
3. Choose a location to save the exported Markdown file
33+
34+
**For selected files:**
35+
1. Select one or more files or folders in the Explorer view
36+
2. Right-click and select "CodebaseMD: Export Selected as Micro Codebase" from the context menu
37+
3. Choose a location to save the exported Markdown file
38+
39+
#### Understanding the Output Format
40+
41+
The micro codebase representation uses a specialized notation:
42+
43+
```
44+
// PATH: src/services/auth/UserAuthentication.java [JAVA]
45+
// DESC: Handles user authentication and session management
46+
// DEPS: io.jwt.*, org.security.*, java.util.*
47+
48+
EXPORT [C:2, I:1, F:5]
49+
50+
C+ UserAuthentication implements I:AuthProvider {
51+
// Core authentication controller
52+
53+
F+ authenticate(user:S, pass:S):AuthResult
54+
[FLOW: validate→verify→createSession]
55+
[THROWS: AuthFailedException]
56+
57+
F- verifyPassword(hash:S, input:S):Bool
58+
[ALG: PBKDF2/SHA256]
59+
60+
V+ sessionStore:Map<S,SessionData>
61+
V- attempts:Counter
62+
63+
C- SessionData {...}
64+
}
65+
66+
PATTERNS:
67+
- Builder pattern for auth options
68+
- Observer for session events
69+
```
70+
71+
Where:
72+
- `C+` = Public Class
73+
- `F-` = Private Function/Method
74+
- `I#` = Protected Interface
75+
- `V+` = Public Variable
76+
- `S` = String type
77+
- `FLOW:` = Execution flow
78+
- `ALG:` = Algorithm used
79+
80+
## Installation
81+
82+
Download the `.vsix` file from this release and install it in VS Code:
83+
84+
1. Open VS Code
85+
2. Press `Ctrl+Shift+X` to open the Extensions view
86+
3. Click on the three dots (⋯) in the top right corner
87+
4. Select "Install from VSIX..." and choose the downloaded file
88+
89+
Thank you for using CodebaseMD!

releases/RELEASE-NOTES-2.0.1.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# CodebaseMD v2.0.1 Release Notes
2+
3+
We're excited to announce the release of CodebaseMD v2.0.1, with important improvements to the Micro Codebase Export feature!
4+
5+
## Improvements
6+
7+
### Enhanced Micro Codebase Export Functionality
8+
9+
This release includes significant improvements to the Micro Codebase Export feature:
10+
11+
- **Improved Method Detection**: Fixed issues with method detection to eliminate false positives
12+
- **Accurate Class Hierarchy**: Now correctly detects and displays class inheritance (`extends`) relationships
13+
- **Better Type Information**: Improved detection of parameter types and return types
14+
- **Variable & Property Accuracy**: Fixed property detection to avoid capturing method calls as properties
15+
- **Flow Pattern Detection**: Added detection of code flow patterns like error handling, async operations, and conditionals
16+
- **Static Member Recognition**: Properly identifies and marks static methods and properties
17+
18+
## Example of Improved Output
19+
20+
```typescript
21+
C+ TaskManager extends EventEmitter {
22+
// Class TaskManager
23+
V- tasks:Map<string, Task> {
24+
// Property tasks
25+
}
26+
V- logger:Logger {
27+
// Property logger
28+
}
29+
V- instance:TaskManager {
30+
// Static property instance
31+
}
32+
F+ createTask(name:string, priority:TaskPriority = TaskPriority.NORMAL):Promise<Task> {
33+
// Method createTask
34+
[FLOW: async-await]
35+
}
36+
F+ executeTask(taskId:string, fn:() => Promise<any>):Promise<any> {
37+
// Method executeTask
38+
[FLOW: error-handlingasync-await]
39+
}
40+
}
41+
```
42+
43+
## Installation
44+
45+
Download the `.vsix` file from this release and install it in VS Code:
46+
47+
1. Open VS Code
48+
2. Press `Ctrl+Shift+X` to open the Extensions view
49+
3. Click on the three dots (⋯) in the top right corner
50+
4. Select "Install from VSIX..." and choose the downloaded file
51+
52+
Thank you for using CodebaseMD!

releases/codebase-md-2.0.0.vsix

166 KB
Binary file not shown.

releases/codebase-md-2.0.1.vsix

183 KB
Binary file not shown.

0 commit comments

Comments
 (0)