Skip to content

## DeepBase v1.8.0 — Light Mode & JavaScript Support#7

Merged
follen99 merged 9 commits intomainfrom
light-mode
Feb 13, 2026
Merged

## DeepBase v1.8.0 — Light Mode & JavaScript Support#7
follen99 merged 9 commits intomainfrom
light-mode

Conversation

@follen99
Copy link
Copy Markdown
Owner

🚀 DeepBase v1.8.0 — Light Mode & JavaScript Support

Highlights

Questa release introduce due novità importanti: il refactoring architetturale del sistema di parsing e il supporto completo per JavaScript/TypeScript/React Native, insieme alla nuova Light Mode per l'ottimizzazione drastica dei token.


✨ Light Mode

La Light Mode è una modalità di output che permette di risparmiare fino al 92% dei token mantenendo intatta l'informazione strutturale necessaria per l'analisi del codice.

Cosa include:

  • Firme di funzioni, classi, interfacce e tipi esportati
  • Commenti JSDoc e documentazione iniziale
  • Struttura del progetto con metriche di dimensione

Cosa esclude:

  • Corpi delle funzioni e implementazioni
  • JSX e logica interna dei componenti
  • Hook e variabili locali

Header di output:

# Project Context: [Nome Progetto]

> **[LIGHT MODE]** Questo file è stato generato in modalità risparmio token: 
> vengono incluse solo le firme dei metodi/funzioni e i commenti iniziali dei file. 
> Il corpo del codice è omesso. Se hai bisogno di approfondire un file, una classe 
> o un metodo specifico, chiedi all'utente di fornire la porzione di codice completa.

### PROJECT STRUCTURE

> Total Size (raw): 7.78 KB | Est. Tokens (light): ~1,991
📁 OpenAndEat/
├── 📄 .gitignore (3.7% | ~75t)
├── 📁 OpenAndEatApp/ (1494.1% | ~29.7k t)
│   ├── 📄 .gitignore (4.9% | ~98t)
│   ├── 📄 App.tsx (6.1% | ~121t)
│   ├── 📄 package.json (16.1% | ~320t)
│   └── 📁 src/ (1454.4% | ~28.9k t)
│       ├── 📁 auth/ (52.4% | ~1.0k t)
│       │   ├── 📄 AuthContext.tsx (43.6% | ~868t)
│       │   └── 📄 getUserRole.ts (8.9% | ~177t)
...

🔧 Refactoring Architetturale

I parser sono stati modularizzati in file separati per migliorare la manutenibilità e facilitare l'aggiunta di nuovi linguaggi:

src/deepbase/parsers/
├── __init__.py
├── interface.py          # LanguageParser ABC
├── python.py             # PythonParser
├── javascript.py         # JavaScriptParser (NEW)
└── utils/
    └── __init__.py

🌐 JavaScript / TypeScript / React Native Support

Nuovo parser dedicato per l'ecosistema JS con supporto per:

Feature Stato
export default
export const/function/class
Arrow functions
TypeScript interfaces & types
React components
JSDoc preservation

📊 Confronto Prestazioni (OpenAndEat)

Modalità Dimensione Token Riduzione
Full 153.11 KB ~39,196
Light 7.78 KB ~1,991 -92%

Risparmio reale: ~37,000 token eliminati mantenendo l'API surface completa.


🔄 Pull Request

Questa release è disponibile nella PR feature/light-modemain.

Branch: feature/light-mode
Target: main
Breaking Changes: Nessuno (nuova funzionalità opt-in via flag --light o configurazione)


📝 Changelog Completo

  • Added: Light Mode per riduzione token (-92% su codebase React Native)
  • Added: JavaScript/TypeScript/React Native parser
  • Changed: Refactoring parser in moduli separati
  • Improved: Supporto export default per JS/TS

Happy coding with 20x fewer tokens! 🎯

non veniva piu riconosciuto alcun comando al di fuori di --help

Fix CLI argument parsing to support mixed options

Refactored main.py to use `typer.run` instead of a command group. This resolves parsing errors when options follow the target argument (e.g., `deepbase . --all`) ensuring single-command behavior.
Introduced tests/test_suite_python.py covering:
- Basic directory structure generation
- Full content extraction (--all)
- Light mode with signature parsing (--light)
- Hybrid focus mode (full content for focused files, signatures for others)
- TOML configuration loading and file ignoring
- Custom output file paths (-o)
- Error handling for invalid targets
database tests
Sostituisce la logica monolitica di `toon.py` con un nuovo package `src/deepbase/parsers/` per migliorare la scalabilità e facilitare l'aggiunta di nuovi linguaggi.

Modifiche principali:
- **Architettura**: Introdotta interfaccia `LanguageParser` e un `Registry` centrale per gestire le estensioni.
- **Supporto**: Implementati parser dedicati per Python, Markdown e LaTeX.
- **Fallback**: Aggiunto un gestore generico che applica un warning per i file non supportati ufficialmente.
- **Test**: Aggiornata e ampliata la suite di test per coprire i nuovi parser e i casi limite.
✅ Fix riuscito: export default ora funziona

| Metrica    | V1       | V1.2     | Delta    |
| ---------- | -------- | -------- | -------- |
| **Totale** | ~3,285   | ~2,991   | **-9%**  |
| Raw size   | 12.83 KB | 11.68 KB | -1.15 KB |

| Aspetto             | V1      | V1.2                    |
| ------------------- | ------- | ----------------------- |
| Pulizia logica      | ✅       | ✅                       |
| Completezza export  | ⚠️ 60%  | ✅ **~75%**              |
| Validità sintattica | ✅       | ✅                       |
| Efficienza token    | ✅ 3,285 | ✅ **2,991** (migliore!) |
@follen99 follen99 merged commit 9ba5960 into main Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant