mirror of
https://github.com/SillyTavern/Extension-Weather.git
synced 2026-10-15 13:32:14 +00:00
[PR #6] [MERGED] Refactor: modularize extension into src/ with per-provider modules #7
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
SillyTavern/Extension-Weather#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/SillyTavern/Extension-Weather/pull/6
Author: @Copilot
Created: 2/25/2026
Status: ✅ Merged
Merged: 2/25/2026
Merged by: @Cohee1207
Base:
main← Head:copilot/refactor-extension-code-structure📝 Commits (2)
c2f9dabInitial plan7e0fba3Refactor: split monolithic index.js into modular src/ structure📊 Changes
10 files changed (+1452 additions, -1343 deletions)
View changed files
📝
index.js(+6 -1343)➕
src/commands.js(+306 -0)➕
src/functions.js(+132 -0)➕
src/providers/accuweather.js(+417 -0)➕
src/providers/index.js(+46 -0)➕
src/providers/open-meteo.js(+155 -0)➕
src/providers/openweathermap.js(+160 -0)➕
src/providers/wttr-in.js(+97 -0)➕
src/settings.js(+123 -0)➕
src/utils.js(+10 -0)📄 Description
Split the monolithic 1347-line
index.jsinto separate modules undersrc/, withindex.jsretained as a thin entry point.Structure
Standard provider interface
Each provider exports two functions with a uniform signature:
API key validation and provider-specific caching are encapsulated within each module. The routing layer (
src/providers/index.js) resolves the active provider from settings and delegates via a simple map lookup with AccuWeather as the default fallback.Notes
extension_settings.accuweather(existing user data compat)💡 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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.