Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Separates SQLite data storage from SQL query generation logic for improved modularity.

Changes

  • Created src/analysis/sqlite.ts - contains SQLiteDataStore class with all database operations (loadData, query, getSchema, close)
  • Updated src/analysis/sql.ts - now contains only generateSQL() LLM function, removed SQLiteDataStore class
  • Updated src/analysis/index.ts - exports SQLiteDataStore from new file, maintains backward compatibility

File Structure

src/analysis/
├── sqlite.ts     // Database wrapper (new)
├── sql.ts        // LLM SQL generation
├── code.ts       // Code execution
└── index.ts      // Re-exports

All existing imports continue to work through src/analysis/index.ts.

Original prompt

Extract the SQLiteDataStore class into its own file for better code organization and clarity.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Copilot AI changed the title [WIP] Extract SQLiteDataStore class into its own file Extract SQLiteDataStore into separate file Jan 30, 2026
Copilot AI requested a review from hustcc January 30, 2026 17:17
@hustcc
Copy link
Member

hustcc commented Jan 30, 2026

@copilot 名字就叫 sqlite 简单点~

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 30, 2026

@copilot 名字就叫 sqlite 简单点~

Done! Renamed sqlite-data-store.ts to sqlite.ts in commit 0153339.

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
@hustcc hustcc marked this pull request as ready for review January 30, 2026 17:30
@hustcc hustcc merged commit 07825d4 into ai Jan 30, 2026
2 checks passed
@hustcc hustcc deleted the copilot/extract-sqldata-store-class branch January 30, 2026 17:31
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.

2 participants