Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Cody.VisualStudio.Tests/SmartApplyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Cody.VisualStudio.Tests
{
public class SmartApplyTests: PlaywrightTestsBase, IDisposable
public class SmartApplyTests : PlaywrightTestsBase, IDisposable
{

private readonly JoinableTaskContext _context = ThreadHelper.JoinableTaskContext;
Expand Down Expand Up @@ -57,7 +57,7 @@ public async Task Apply_Suggestion_Is_Modifying_Point_Document()
Assert.NotEqual(modifiedText, originalText);
}

[VsFact(Version = VsVersion.VS2022)]
[VsFact(Version = VsVersion.VS2022, Skip = "Unstable")]
public async Task Apply_Suggestion_Is_Modifying_Manager_Document()
{
// given
Expand Down Expand Up @@ -88,7 +88,7 @@ private async Task ApplyLastSuggestionFor(string chatText)
if (hasHiddenClass)
await apply.EvaluateAsync("element => element.classList.remove('tw-hidden')"); // force shows "Apply" text so it will be possible to click on it

await apply.ClickAsync(new() {Force = true});
await apply.ClickAsync(new() { Force = true });

await EditAppliedAsync();
}
Expand Down
13 changes: 11 additions & 2 deletions src/Cody.VisualStudio/Services/StatusbarService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void InitializeCodyIcon()
stackPanel = new StackPanel()
{
Orientation = Orientation.Horizontal,
Margin = new Thickness(0, 0, 10, 0),
Margin = new Thickness(5, 0, 10, 0),
};

codyIcon = new Image()
Expand All @@ -108,9 +108,18 @@ private void InitializeCodyIcon()
DockPanel.SetDock(stackPanel, Dock.Right);
stackPanel.MouseUp += (sender, args) => CodyStatusIconClicked?.Invoke(codyIcon, EventArgs.Empty);

var mainWindow = Application.Current.MainWindow;

if (mainWindow.IsLoaded) InjectControlIntoStatusbar();
else mainWindow.Loaded += (sender, args) => InjectControlIntoStatusbar();

}

private void InjectControlIntoStatusbar()
{
var resizeGripControl = Utilities.UIHelper.FindChild<Control>(Application.Current.MainWindow, "ResizeGripControl");
var dockPanel = resizeGripControl.Parent as DockPanel;
dockPanel.Children.Insert(2, stackPanel);
dockPanel.Children.Insert(1, stackPanel);
}

private void SetTextBlockForegroundColor()
Expand Down