diff options
author | Nate Sesti <33237525+sestinj@users.noreply.github.com> | 2023-09-23 13:06:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-23 13:06:00 -0700 |
commit | e976d60974a7837967d03807605cbf2e7b4f3f9a (patch) | |
tree | 5ecb19062abb162832530dd953e9d2801026c23c /extension/src/diffs.ts | |
parent | 470711d25b44d1a545c57bc17d40d5e1fd402216 (diff) | |
download | sncontinue-e976d60974a7837967d03807605cbf2e7b4f3f9a.tar.gz sncontinue-e976d60974a7837967d03807605cbf2e7b4f3f9a.tar.bz2 sncontinue-e976d60974a7837967d03807605cbf2e7b4f3f9a.zip |
UI Redesign and fixing many details (#496)
* feat: :lipstick: start of major design upgrade
* feat: :lipstick: model selection page
* feat: :lipstick: use shortcut to add highlighted code as ctx
* feat: :lipstick: better display of errors
* feat: :lipstick: ui for learning keyboard shortcuts, more details
* refactor: :construction: testing slash commands ui
* Truncate continue.log
* refactor: :construction: refactoring client_session, ui, more
* feat: :bug: layout fixes
* refactor: :lipstick: ui to enter OpenAI Key
* refactor: :truck: rename MaybeProxyOpenAI -> OpenAIFreeTrial
* starting help center
* removing old shortcut docs
* fix: :bug: fix model setting logic to avoid overwrites
* feat: :lipstick: tutorial and model descriptions
* refactor: :truck: rename unused -> saved
* refactor: :truck: rename model roles
* feat: :lipstick: edit indicator
* refactor: :lipstick: move +, folder icons
* feat: :lipstick: tab to clear all context
* fix: :bug: context providers ui fixes
* fix: :bug: fix lag when stopping step
* fix: :bug: don't override system message for models
* fix: :bug: fix continue button cursor
* feat: :lipstick: title bar
* fix: :bug: updates to code highlighting logic and more
* fix: :bug: fix renaming of summarize model role
* feat: :lipstick: help page and better session title
* feat: :lipstick: more help page / ui improvements
* feat: :lipstick: set session title
* fix: :bug: small fixes for changing sessions
* fix: :bug: perfecting the highlighting code and ctx interactions
* style: :lipstick: sticky headers for scroll, ollama warming
* fix: :bug: fix toggle bug
---------
Co-authored-by: Ty Dunn <ty@tydunn.com>
Diffstat (limited to 'extension/src/diffs.ts')
-rw-r--r-- | extension/src/diffs.ts | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/extension/src/diffs.ts b/extension/src/diffs.ts index 4c077a25..426415fc 100644 --- a/extension/src/diffs.ts +++ b/extension/src/diffs.ts @@ -3,7 +3,7 @@ import * as path from "path"; import * as fs from "fs"; import * as vscode from "vscode"; import { extensionContext, ideProtocolClient } from "./activation/activate"; -import { getMetaKeyLabel } from "./util/util"; +import { getMetaKeyLabel, getPlatform } from "./util/util"; import { devDataPath } from "./activation/environmentSetup"; import { uriFromFilePath } from "./util/vscode"; @@ -194,10 +194,15 @@ class DiffManager { this.diffs.set(newFilepath, diffInfo); } - vscode.commands.executeCommand( - "workbench.action.files.revert", - uriFromFilePath(newFilepath) - ); + if (getPlatform() === "windows") { + // Just a matter of how it renders + // Lags on windows without this + // Flashes too much on mac with it + vscode.commands.executeCommand( + "workbench.action.files.revert", + uriFromFilePath(newFilepath) + ); + } return newFilepath; } @@ -271,6 +276,8 @@ class DiffManager { }); await recordAcceptReject(true, diffInfo); + + ideProtocolClient.sendAcceptRejectDiff(true, diffInfo.step_index); } async rejectDiff(newFilepath?: string) { @@ -302,6 +309,8 @@ class DiffManager { }); await recordAcceptReject(false, diffInfo); + + ideProtocolClient.sendAcceptRejectDiff(false, diffInfo.step_index); } } @@ -339,10 +348,8 @@ async function recordAcceptReject(accepted: boolean, diffInfo: DiffInfo) { export async function acceptDiffCommand(newFilepath?: string) { await diffManager.acceptDiff(newFilepath); - ideProtocolClient.sendAcceptRejectDiff(true); } export async function rejectDiffCommand(newFilepath?: string) { await diffManager.rejectDiff(newFilepath); - ideProtocolClient.sendAcceptRejectDiff(false); } |