Skip to content

Commit

Permalink
Add TODO comments
Browse files Browse the repository at this point in the history
  • Loading branch information
taichimaeda committed Apr 28, 2024
1 parent 5dc4169 commit b01011c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/providers/costs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export class CostsTracker {
settings.usage.dailyCosts[today] += cost;
settings.usage.monthlyCosts[thisMonth] += cost;

// TODO:
// Only save settings before unload.
await this.plugin.saveSettings();
}
}
2 changes: 2 additions & 0 deletions src/chat/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export function App({
// There may be a better way to store chat history, but this works for now.
useEffect(() => {
settings.chat.history = history;
// TODO:
// Only save settings before unload.
plugin.saveSettings();
}, [history]);

Expand Down
3 changes: 3 additions & 0 deletions src/editor/listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ function showCompletions(fetcher: CompletionsFetcher) {
return async (update: ViewUpdate) => {
const { state, view } = update;

// TODO:
// Stop re-fetching the completions when the suggestions match the typed text.

// If the document has not changed and the head has not moved, keep the completions.
const previousHead = lastHead;
const currentHead = state.selection.main.head;
Expand Down
3 changes: 3 additions & 0 deletions src/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,9 @@ export class MarkpilotSettingTab extends PluginSettingTab {
data[index].cost = cost;
}
}
// TODO:
// Replace with "Text Colors":
// https://docs.obsidian.md/Reference/CSS+variables/Foundations/Colors#Text+colors
// Get the accent color from the theme
// using CSS variables provided by Obsidian:
// https://docs.obsidian.md/Reference/CSS+variables/Foundations/Colors#Accent+color
Expand Down

0 comments on commit b01011c

Please sign in to comment.