Skip to content

Commit

Permalink
feat: only set the default url when start
Browse files Browse the repository at this point in the history
  • Loading branch information
LiLittleCat committed Mar 21, 2023
1 parent 0fdba25 commit 01abf5d
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ public class ChatGPTSettingsState implements PersistentStateComponent<ChatGPTSet
public ChatGPTSettingsState() {
urlList = new ArrayList<>();
urlList.add(ChatGPTBundle.message("default.url"));
ResourceBundle bundle = ResourceBundle.getBundle(ChatGPTBundle.BUNDLE);
Enumeration<String> keys = bundle.getKeys();
while (keys.hasMoreElements()) {
String key = keys.nextElement();
if (key.startsWith("url")) {
String url = bundle.getString(key);
System.out.println(key + ": " + url);
urlList.add(url);
}
}
// ResourceBundle bundle = ResourceBundle.getBundle(ChatGPTBundle.BUNDLE);
// Enumeration<String> keys = bundle.getKeys();
// while (keys.hasMoreElements()) {
// String key = keys.nextElement();
// if (key.startsWith("url")) {
// String url = bundle.getString(key);
// System.out.println(key + ": " + url);
// urlList.add(url);
// }
// }
}

@Nullable
Expand Down

0 comments on commit 01abf5d

Please sign in to comment.