[PR #2] [MERGED] Add /weather-provider slash command #3

Closed
opened 2026-10-15 13:27:55 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SillyTavern/Extension-Weather/pull/2
Author: @Copilot
Created: 2/24/2026
Status: ✅ Merged
Merged: 2/24/2026
Merged by: @Cohee1207

Base: main ← Head: copilot/add-weather-provider-command


📝 Commits (7)

  • 41afced Initial plan
  • da58eef Add /weather-provider slash command to switch between weather API providers
  • 1985e90 Address review: WEATHER_PROVIDERS as object with names, add enumList to quiet arg, use toString() on value
  • 50eafa0 Add /weather-provider command to README.md documentation
  • dac5b39 Accept human-readable provider names and display them in toast
  • 5fe1ad2 Use Object.entries for provider lookup
  • eb0c027 Refactor weather provider lookup to destructure provider name and improve error handling

📊 Changes

2 files changed (+80 additions, -0 deletions)

View changed files

📝 README.md (+20 -0)
📝 index.js (+60 -0)

📄 Description

  • Add /weather-provider slash command to index.js
    • Import SlashCommandEnumValue, enumTypes, and commonEnumProviders
    • No argument: returns the current provider name
    • Unnamed argument: sets the specified provider and returns its name
    • Add quiet named argument (boolean) with enumList from commonEnumProviders.boolean('trueFalse')()
    • Show success toast with human-readable provider name (unless quiet=true)
    • Use enum provider with human-readable names from WEATHER_PROVIDERS object
    • Accept both keys and human-readable names as valid input
    • Use toString() on value before trimming
    • Update the settings UI dropdown to stay in sync when changed via command
  • Add /weather-provider to README.md documentation with usage, valid providers, arguments, and examples
  • Run code review and security checks

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SillyTavern/Extension-Weather/pull/2 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 2/24/2026 **Status:** ✅ Merged **Merged:** 2/24/2026 **Merged by:** [@Cohee1207](https://github.com/Cohee1207) **Base:** `main` ← **Head:** `copilot/add-weather-provider-command` --- ### 📝 Commits (7) - [`41afced`](https://github.com/SillyTavern/Extension-Weather/commit/41afced4017b2a99d81305500917b7f4ab0a6c83) Initial plan - [`da58eef`](https://github.com/SillyTavern/Extension-Weather/commit/da58eef8a6432ae1215af6202ba73f1d90a70d5c) Add /weather-provider slash command to switch between weather API providers - [`1985e90`](https://github.com/SillyTavern/Extension-Weather/commit/1985e9060b8f42d02b7ec78487fd1cea25c8a0fb) Address review: WEATHER_PROVIDERS as object with names, add enumList to quiet arg, use toString() on value - [`50eafa0`](https://github.com/SillyTavern/Extension-Weather/commit/50eafa059466c7ae4b2dff4021e93748a7c56062) Add /weather-provider command to README.md documentation - [`dac5b39`](https://github.com/SillyTavern/Extension-Weather/commit/dac5b39b6138fcab95f522308a163c0be5629408) Accept human-readable provider names and display them in toast - [`5fe1ad2`](https://github.com/SillyTavern/Extension-Weather/commit/5fe1ad200f423fdcb30a1c3e39b757bf6edda1fa) Use Object.entries for provider lookup - [`eb0c027`](https://github.com/SillyTavern/Extension-Weather/commit/eb0c027491bdaa443abf3d98e655cba4e0123df2) Refactor weather provider lookup to destructure provider name and improve error handling ### 📊 Changes **2 files changed** (+80 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+20 -0) 📝 `index.js` (+60 -0) </details> ### 📄 Description - [x] Add `/weather-provider` slash command to `index.js` - [x] Import `SlashCommandEnumValue`, `enumTypes`, and `commonEnumProviders` - [x] No argument: returns the current provider name - [x] Unnamed argument: sets the specified provider and returns its name - [x] Add `quiet` named argument (boolean) with `enumList` from `commonEnumProviders.boolean('trueFalse')()` - [x] Show success toast with human-readable provider name (unless `quiet=true`) - [x] Use enum provider with human-readable names from `WEATHER_PROVIDERS` object - [x] Accept both keys and human-readable names as valid input - [x] Use `toString()` on value before trimming - [x] Update the settings UI dropdown to stay in sync when changed via command - [x] Add `/weather-provider` to README.md documentation with usage, valid providers, arguments, and examples - [x] Run code review and security checks <!-- START COPILOT CODING AGENT TIPS --> --- 🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. [Learn more about Advanced Security.](https://gh.io/cca-advanced-security) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 13:27:55 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/Extension-Weather#3
No description provided.