diff --git a/GoAwayEdge/App.xaml.cs b/GoAwayEdge/App.xaml.cs
index 6126c8a..4727191 100644
--- a/GoAwayEdge/App.xaml.cs
+++ b/GoAwayEdge/App.xaml.cs
@@ -27,7 +27,7 @@ namespace GoAwayEdge
public partial class App
{
public static bool IsDebug = false;
-
+
public void Application_Startup(object sender, StartupEventArgs e)
{
#if DEBUG
@@ -50,17 +50,7 @@ public void Application_Startup(object sender, StartupEventArgs e)
IsDebug = true;
if (IsAdministrator() == false)
{
- // Restart program and run as admin
- var exeName = Process.GetCurrentProcess().MainModule?.FileName;
- if (exeName != null)
- {
- var startInfo = new ProcessStartInfo(exeName)
- {
- Verb = "runas",
- UseShellExecute = true
- };
- Process.Start(startInfo);
- }
+ ElevateAsAdmin();
Environment.Exit(0);
return;
}
@@ -80,18 +70,7 @@ public void Application_Startup(object sender, StartupEventArgs e)
{
if (IsAdministrator() == false)
{
- // Restart program and run as admin
- var exeName = Process.GetCurrentProcess().MainModule?.FileName;
- if (exeName != null)
- {
- var startInfo = new ProcessStartInfo(exeName)
- {
- Verb = "runas",
- UseShellExecute = true,
- Arguments = string.Join(" ", args)
- };
- Process.Start(startInfo);
- }
+ ElevateAsAdmin(string.Join(" ", args));
Environment.Exit(0);
return;
}
@@ -145,18 +124,7 @@ public void Application_Startup(object sender, StartupEventArgs e)
if (IsAdministrator() == false)
{
- // Restart program and run as admin
- var exeName = Process.GetCurrentProcess().MainModule?.FileName;
- if (exeName != null)
- {
- var startInfo = new ProcessStartInfo(exeName)
- {
- Verb = "runas",
- UseShellExecute = true,
- Arguments = string.Join(" ", args)
- };
- Process.Start(startInfo);
- }
+ ElevateAsAdmin(string.Join(" ", args));
Environment.Exit(0);
return;
}
@@ -223,22 +191,8 @@ public void Application_Startup(object sender, StartupEventArgs e)
ifeoMessageUi.ShowDialog();
if (ifeoMessageUi.Summary == "Btn1")
- {
- // Restart program and run as admin
- var exeName = Process.GetCurrentProcess().MainModule?.FileName;
- if (exeName != null)
- {
- var startInfo = new ProcessStartInfo(exeName)
- {
- Verb = "runas",
- UseShellExecute = true,
- Arguments = "--update"
- };
- Process.Start(startInfo);
- }
- Environment.Exit(0);
- return;
- }
+ ElevateAsAdmin("--update");
+
Environment.Exit(0);
}
Updater.ModifyIfeoBinary(ModifyAction.Update);
@@ -253,22 +207,8 @@ public void Application_Startup(object sender, StartupEventArgs e)
ifeoMessageUi.ShowDialog();
if (ifeoMessageUi.Summary == "Btn1")
- {
- // Restart program and run as admin
- var exeName = Process.GetCurrentProcess().MainModule?.FileName;
- if (exeName != null)
- {
- var startInfo = new ProcessStartInfo(exeName)
- {
- Verb = "runas",
- UseShellExecute = true,
- Arguments = "--update"
- };
- Process.Start(startInfo);
- }
- Environment.Exit(0);
- return;
- }
+ ElevateAsAdmin("--update");
+
Environment.Exit(0);
}
Updater.ModifyIfeoBinary(ModifyAction.Create);
@@ -285,7 +225,21 @@ public void Application_Startup(object sender, StartupEventArgs e)
ArgumentParse.Parse(args);
Environment.Exit(0);
}
-
+
+ private void ElevateAsAdmin(string arguments = null)
+ {
+ // Restart program and run as admin
+ var exeName = Process.GetCurrentProcess().MainModule?.FileName;
+ if (exeName == null) return;
+ var startInfo = new ProcessStartInfo(exeName)
+ {
+ Verb = "runas",
+ UseShellExecute = true,
+ Arguments = arguments
+ };
+ Process.Start(startInfo);
+ }
+
private static string? ParseCustomSearchEngine(string argument)
{
var argParsed = argument.Remove(0, 6);
@@ -293,6 +247,7 @@ public void Application_Startup(object sender, StartupEventArgs e)
&& (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
return result ? argParsed : null;
}
+
private static bool IsAdministrator()
{
var identity = WindowsIdentity.GetCurrent();
diff --git a/GoAwayEdge/Assets/Copilot.xaml b/GoAwayEdge/Assets/Copilot.xaml
index 118dade..32c2ca9 100644
--- a/GoAwayEdge/Assets/Copilot.xaml
+++ b/GoAwayEdge/Assets/Copilot.xaml
@@ -1,14 +1,14 @@
- F1 M48,48z M0,0z M21.676,19.303C21.676,19.303,22.49,16.048,26.367,15.904L38.144,15.904C38.144,15.904 34.745,15.617 34.075,11.5 33.405,7.383 31.634,5.755 29.144,5.707 26.655,5.659 25.506,8.292 25.218,9.202 24.931,10.112 21.676,19.303 21.676,19.303z
- F1 M48,48z M0,0z M19.234,29.261L25.266,9.011C25.266,9.011,26.415,5.612,29.144,5.708L14.016,5.708C14.016,5.708 11.431,5.708 9.564,8.676 9.564,8.676 6.692,12.41 5.016,20.07 3.34,27.73 4.011,28.16 4.011,28.16 4.011,28.16 3.58,32.373 10.043,32.038L15.022,32.038C15.021,32.037,18.037,32.085,19.234,29.261z
- F1 M48,48z M0,0z M28.887,6.707L31.358,6.303C30.762,5.945,30.048,5.759,29.308,5.719L29.109,5.708C29.105,5.708 29.102,5.708 29.098,5.707 29.082,5.707 29.067,5.709 29.05,5.709 28.875,5.708 28.71,5.724 28.548,5.748 28.479,5.758 28.412,5.771 28.346,5.785 28.241,5.808 28.14,5.837 28.041,5.869 27.589,6.018 27.193,6.255 26.855,6.546 26.738,6.648 26.63,6.755 26.526,6.866 25.765,7.677 25.344,8.699 25.186,9.2 25.147,9.325 25.047,9.616 24.912,10.008L22.694,17.452C22.78,17.36 22.892,17.273 22.991,17.183 23.047,17.132 23.099,17.08 23.159,17.031 23.247,16.959 23.339,16.892 23.436,16.823 23.602,16.705 23.777,16.592 23.973,16.49 23.998,16.477 24.016,16.46 24.042,16.447L26.173,9.293C26.174,9.296,27.066,6.787,28.887,6.707z
- F1 M48,48z M0,0z M28.864,6.207L30.34,5.867C30.34,5.867 29.654,5.691 29.088,5.712 28.668,5.727 28.286,5.784 27.941,5.915 27.914,5.926 27.885,5.934 27.858,5.946 27.777,5.979 27.699,6.019 27.622,6.058 27.565,6.088 27.507,6.117 27.452,6.149 27.404,6.177 27.358,6.207 27.311,6.237 27.226,6.293 27.142,6.351 27.062,6.413 27.045,6.426 27.029,6.439 27.013,6.452 26.584,6.798 26.24,7.219 25.974,7.62 25.968,7.629 25.962,7.637 25.957,7.646 25.928,7.69 25.904,7.732 25.877,7.776 25.535,8.338 25.321,8.88 25.219,9.204 25.201,9.262 25.169,9.356 25.128,9.478L22.751,17.456C22.931,17.262,23.139,17.071,23.377,16.893L25.682,9.155C25.685,9.143,26.684,6.292,28.864,6.207z
- F1 M48,48z M0,0z M26.474,28.607C26.474,28.607,25.66,31.862,21.783,32.006L10.006,32.006C10.006,32.006 13.405,32.293 14.075,36.41 14.745,40.527 16.516,42.155 19.006,42.203 21.496,42.251 22.644,39.618 22.932,38.708 23.219,37.799 26.474,28.607 26.474,28.607z
- F1 M48,48z M0,0z M19.255,41.171L16.784,41.575C17.38,41.933,18.094,42.119,18.834,42.159L19.033,42.17C19.037,42.17 19.04,42.17 19.044,42.171 19.06,42.171 19.075,42.169 19.092,42.169 19.267,42.17 19.432,42.154 19.594,42.13 19.663,42.12 19.73,42.107 19.796,42.093 19.901,42.07 20.002,42.041 20.101,42.009 20.553,41.86 20.949,41.623 21.287,41.332 21.404,41.23 21.512,41.123 21.616,41.012 22.377,40.201 22.798,39.179 22.956,38.678 22.995,38.553 23.095,38.262 23.23,37.87L25.448,30.426C25.362,30.518 25.25,30.605 25.151,30.695 25.095,30.746 25.043,30.798 24.983,30.847 24.895,30.919 24.803,30.986 24.706,31.055 24.54,31.173 24.365,31.286 24.169,31.388 24.144,31.401 24.126,31.418 24.1,31.431L21.969,38.585C21.969,38.582,21.077,41.091,19.255,41.171z
- F1 M48,48z M0,0z M19.278,41.671L17.802,42.011C17.802,42.011 18.488,42.187 19.054,42.166 19.474,42.151 19.856,42.094 20.201,41.963 20.228,41.952 20.257,41.944 20.284,41.932 20.365,41.899 20.443,41.859 20.52,41.82 20.577,41.79 20.635,41.761 20.69,41.729 20.738,41.701 20.784,41.671 20.831,41.641 20.916,41.585 21,41.527 21.08,41.465 21.097,41.452 21.113,41.439 21.129,41.426 21.558,41.08 21.902,40.659 22.168,40.258 22.174,40.249 22.18,40.241 22.185,40.232 22.214,40.188 22.238,40.146 22.265,40.102 22.607,39.54 22.821,38.998 22.923,38.674 22.941,38.616 22.973,38.522 23.014,38.4L25.391,30.422C25.211,30.616,25.003,30.807,24.765,30.985L22.46,38.723C22.457,38.736,21.458,41.586,19.278,41.671z
- F1 M48,48z M0,0z M28.915,18.65L22.845,38.913C22.845,38.913,21.734,42.299,19.006,42.203L34.134,42.203C34.134,42.203 36.719,42.203 38.586,39.235 38.586,39.235 41.458,35.501 43.134,27.841 44.81,20.181 44.139,19.751 44.139,19.751 44.139,19.751 44.57,15.538 38.107,15.873L33.128,15.873C33.128,15.873,30.112,15.826,28.915,18.65z
-
-
+ F1 M48,48z M0,0z M21.676,19.303C21.676,19.303,22.49,16.048,26.367,15.904L38.144,15.904C38.144,15.904 34.745,15.617 34.075,11.5 33.405,7.383 31.634,5.755 29.144,5.707 26.655,5.659 25.506,8.292 25.218,9.202 24.931,10.112 21.676,19.303 21.676,19.303z
+ F1 M48,48z M0,0z M19.234,29.261L25.266,9.011C25.266,9.011,26.415,5.612,29.144,5.708L14.016,5.708C14.016,5.708 11.431,5.708 9.564,8.676 9.564,8.676 6.692,12.41 5.016,20.07 3.34,27.73 4.011,28.16 4.011,28.16 4.011,28.16 3.58,32.373 10.043,32.038L15.022,32.038C15.021,32.037,18.037,32.085,19.234,29.261z
+ F1 M48,48z M0,0z M28.887,6.707L31.358,6.303C30.762,5.945,30.048,5.759,29.308,5.719L29.109,5.708C29.105,5.708 29.102,5.708 29.098,5.707 29.082,5.707 29.067,5.709 29.05,5.709 28.875,5.708 28.71,5.724 28.548,5.748 28.479,5.758 28.412,5.771 28.346,5.785 28.241,5.808 28.14,5.837 28.041,5.869 27.589,6.018 27.193,6.255 26.855,6.546 26.738,6.648 26.63,6.755 26.526,6.866 25.765,7.677 25.344,8.699 25.186,9.2 25.147,9.325 25.047,9.616 24.912,10.008L22.694,17.452C22.78,17.36 22.892,17.273 22.991,17.183 23.047,17.132 23.099,17.08 23.159,17.031 23.247,16.959 23.339,16.892 23.436,16.823 23.602,16.705 23.777,16.592 23.973,16.49 23.998,16.477 24.016,16.46 24.042,16.447L26.173,9.293C26.174,9.296,27.066,6.787,28.887,6.707z
+ F1 M48,48z M0,0z M28.864,6.207L30.34,5.867C30.34,5.867 29.654,5.691 29.088,5.712 28.668,5.727 28.286,5.784 27.941,5.915 27.914,5.926 27.885,5.934 27.858,5.946 27.777,5.979 27.699,6.019 27.622,6.058 27.565,6.088 27.507,6.117 27.452,6.149 27.404,6.177 27.358,6.207 27.311,6.237 27.226,6.293 27.142,6.351 27.062,6.413 27.045,6.426 27.029,6.439 27.013,6.452 26.584,6.798 26.24,7.219 25.974,7.62 25.968,7.629 25.962,7.637 25.957,7.646 25.928,7.69 25.904,7.732 25.877,7.776 25.535,8.338 25.321,8.88 25.219,9.204 25.201,9.262 25.169,9.356 25.128,9.478L22.751,17.456C22.931,17.262,23.139,17.071,23.377,16.893L25.682,9.155C25.685,9.143,26.684,6.292,28.864,6.207z
+ F1 M48,48z M0,0z M26.474,28.607C26.474,28.607,25.66,31.862,21.783,32.006L10.006,32.006C10.006,32.006 13.405,32.293 14.075,36.41 14.745,40.527 16.516,42.155 19.006,42.203 21.496,42.251 22.644,39.618 22.932,38.708 23.219,37.799 26.474,28.607 26.474,28.607z
+ F1 M48,48z M0,0z M19.255,41.171L16.784,41.575C17.38,41.933,18.094,42.119,18.834,42.159L19.033,42.17C19.037,42.17 19.04,42.17 19.044,42.171 19.06,42.171 19.075,42.169 19.092,42.169 19.267,42.17 19.432,42.154 19.594,42.13 19.663,42.12 19.73,42.107 19.796,42.093 19.901,42.07 20.002,42.041 20.101,42.009 20.553,41.86 20.949,41.623 21.287,41.332 21.404,41.23 21.512,41.123 21.616,41.012 22.377,40.201 22.798,39.179 22.956,38.678 22.995,38.553 23.095,38.262 23.23,37.87L25.448,30.426C25.362,30.518 25.25,30.605 25.151,30.695 25.095,30.746 25.043,30.798 24.983,30.847 24.895,30.919 24.803,30.986 24.706,31.055 24.54,31.173 24.365,31.286 24.169,31.388 24.144,31.401 24.126,31.418 24.1,31.431L21.969,38.585C21.969,38.582,21.077,41.091,19.255,41.171z
+ F1 M48,48z M0,0z M19.278,41.671L17.802,42.011C17.802,42.011 18.488,42.187 19.054,42.166 19.474,42.151 19.856,42.094 20.201,41.963 20.228,41.952 20.257,41.944 20.284,41.932 20.365,41.899 20.443,41.859 20.52,41.82 20.577,41.79 20.635,41.761 20.69,41.729 20.738,41.701 20.784,41.671 20.831,41.641 20.916,41.585 21,41.527 21.08,41.465 21.097,41.452 21.113,41.439 21.129,41.426 21.558,41.08 21.902,40.659 22.168,40.258 22.174,40.249 22.18,40.241 22.185,40.232 22.214,40.188 22.238,40.146 22.265,40.102 22.607,39.54 22.821,38.998 22.923,38.674 22.941,38.616 22.973,38.522 23.014,38.4L25.391,30.422C25.211,30.616,25.003,30.807,24.765,30.985L22.46,38.723C22.457,38.736,21.458,41.586,19.278,41.671z
+ F1 M48,48z M0,0z M28.915,18.65L22.845,38.913C22.845,38.913,21.734,42.299,19.006,42.203L34.134,42.203C34.134,42.203 36.719,42.203 38.586,39.235 38.586,39.235 41.458,35.501 43.134,27.841 44.81,20.181 44.139,19.751 44.139,19.751 44.139,19.751 44.57,15.538 38.107,15.873L33.128,15.873C33.128,15.873,30.112,15.826,28.915,18.65z
+
+
@@ -18,7 +18,7 @@
-
+
@@ -36,17 +36,17 @@
-
+
-
+
-
+
@@ -57,17 +57,17 @@
-
+
-
+
-
+
@@ -77,5 +77,5 @@
-
+
\ No newline at end of file
diff --git a/GoAwayEdge/Assets/CopilotWhite.xaml b/GoAwayEdge/Assets/CopilotWhite.xaml
new file mode 100644
index 0000000..ab29391
--- /dev/null
+++ b/GoAwayEdge/Assets/CopilotWhite.xaml
@@ -0,0 +1,10 @@
+
+ F1 M37,32z M0,0z M35.9718,9.96262C35.1149,8.80378,33.7888,8.14,32.3347,8.14L30.1805,8.14 28.5052,8.14 26.9512,3.14352C26.4006,1.29278,24.649,0,22.6932,0L22.4105,0 11.6361,0C8.0131,0,4.87994,2.331,3.8395,5.8016L0.190558,17.9642C-0.216442,19.3221 0.0351583,20.7533 0.881718,21.8907 1.72754,23.0273 3.02624,23.68 4.44334,23.68L7.84438,23.68C8.6162,23.9686,9.37174,24.4318,9.6559,26.1079L9.76838,26.7858C10.2242,29.5719 10.5254,31.4123 13.9753,31.8148 14.0041,31.8185 14.033,31.82 14.0604,31.82L25.019,31.82C28.6968,31.82,31.8781,29.4905,32.9348,26.0221L36.6467,13.8587C37.0574,12.5156,36.8109,11.0948,35.9718,9.96262z M22.4105,1.48L22.6932,1.48C24.0001,1.48,25.1678,2.33766,25.5363,3.5742L26.9556,8.14 25.3328,8.14C24.5173,8.14 23.7573,8.39604 23.1357,8.8393 23.0825,8.81858 23.0321,8.7912 22.9722,8.78306 20.8972,8.50482 19.4261,8.81488 18.3923,9.31068L19.623,5.20812C19.9885,3.99156,21.1496,1.48,22.4105,1.48z M21.9858,10.1735C21.8896,10.3637,21.8052,10.5628,21.7416,10.7729L18.3805,21.7878C17.5739,22.1785 15.7424,22.2673 14.2365,22.2585 14.514,21.9025 14.7367,21.4977 14.8729,21.0426L17.6235,11.874C17.8899,11.4064,18.9525,9.99814,21.9858,10.1735z M4.44334,22.2C3.4991,22.2 2.6333,21.7649 2.06868,21.0071 1.5048,20.2494 1.33682,19.2955 1.6084,18.3897L5.25734,6.22636C6.10908,3.38772,8.67244,1.48,11.6361,1.48L19.8575,1.48C18.8371,2.7713,18.2947,4.4844,18.2051,4.78262L16.2449,11.3168C16.2005,11.4056 16.1753,11.467 16.1694,11.4833 16.1442,11.5477 16.142,11.6136 16.1361,11.6794L13.4543,20.6186C13.1709,21.5643,12.3155,22.2,11.3276,22.2L10.7555,22.2 4.44334,22.2z M14.087,30.337C11.8071,30.0581,11.6791,29.3003,11.2284,26.5468L11.1152,25.8608C10.9524,24.8995,10.6431,24.2032,10.2627,23.68L11.3276,23.68C11.3298,23.68,11.332,23.6793,11.3342,23.6793L12.371,23.6785C12.5708,23.6918 13.4033,23.7429 14.4415,23.7429 15.5219,23.7429 16.8198,23.6844 17.8655,23.4743L16.9094,26.6082C16.6149,27.5702,15.4656,30.3015,14.087,30.337z M35.2318,13.4273L31.5199,25.5907C30.6667,28.3864,27.9938,30.34,25.019,30.34L16.6489,30.34C17.6827,29.0502,18.2347,27.3386,18.325,27.0411L23.1565,11.2058C23.4421,10.2719,24.3368,9.62,25.3321,9.62L27.9605,9.62 30.1805,9.62 32.3347,9.62C33.3144,9.62 34.2069,10.0662 34.7826,10.8425 35.3398,11.5951 35.5026,12.5363 35.2318,13.4273z
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GoAwayEdge/Assets/EdgeIcon.xaml b/GoAwayEdge/Assets/EdgeIcon.xaml
new file mode 100644
index 0000000..d941c18
--- /dev/null
+++ b/GoAwayEdge/Assets/EdgeIcon.xaml
@@ -0,0 +1,7 @@
+
+ F1 M37,36z M0,0z M18.3169,1.6453E-05C10.5041,1.6453E-05 3.85789,4.6666 1.13039,11.9701 3.35676,9.52188 6.30504,8.21538 9.73085,8.21538L9.75652,8.21538C15.0719,8.2236,20.6898,11.5841,22.5465,15.8643L22.5385,15.8643C23.2039,17.1624 23.0489,18.5017 22.8353,19.3478 22.5889,20.309 22.2192,20.7604 22.0796,20.9412L22.0042,21.039C21.733,21.3759 21.7752,21.8697 22.0956,22.1655 22.1531,22.2147 22.2436,22.2807 22.3668,22.3628L22.5802,22.4944C23.6236,23.1516 25.9815,23.8246 28.1175,23.8246 29.7524,23.8246 31.8878,23.5701 33.8924,21.5573 37.2607,18.189 35.9622,13.4894 35.4857,12.1257 34.6724,9.81717 31.2968,2.14434 21.8244,0.336961 20.6743,0.115147 19.4917,1.6453E-05 18.3169,1.6453E-05z M9.73085,9.85845C5.45886,9.85845 2.03344,12.2499 0.0617534,16.604 -0.58726,24.1293 3.97176,30.8812 9.39389,33.9044 10.1743,34.3399 12.6551,35.5892 16.1138,36 13.0577,34.5541 10.7331,32.0317 9.66506,28.7538 7.89054,23.307 10.1172,17.4911 15.334,13.9421L15.342,13.9501C16.1307,13.4325 17.0919,13.1366 18.0778,13.1366 18.1928,13.1366 18.2997,13.1362 18.4148,13.1526 16.1062,11.1809 12.8373,9.86667 9.75653,9.85845L9.73085,9.85845z M13.1405,18.2134C10.8567,21.1463 10.1088,24.7865 11.2343,28.2451 12.7213,32.8129 17.0679,35.7044 22.3668,35.7208 26.4909,34.8007 30.0801,32.3926 33.0869,28.5067L33.1607,28.4088C33.3661,28.1048 33.3506,27.7015 33.1206,27.414 32.8823,27.1347 32.4882,27.0367 32.1514,27.1845L31.7567,27.3658C31.5924,27.4398 31.4448,27.4879 31.2641,27.5536 31.0751,27.6193 30.8615,27.7017 30.5821,27.8167 29.5224,28.2521 27.9454,28.4987 26.253,28.4987 24.8318,28.4987 23.4434,28.3186 22.3507,27.99 20.8062,27.53 16.0976,26.1082 13.6412,20.6861 13.3372,20.0124 13.1323,19.15 13.1405,18.2134z
+
+
+
+
+
\ No newline at end of file
diff --git a/GoAwayEdge/Common/Configuration.cs b/GoAwayEdge/Common/Configuration.cs
index 11ce286..7866071 100644
--- a/GoAwayEdge/Common/Configuration.cs
+++ b/GoAwayEdge/Common/Configuration.cs
@@ -26,6 +26,8 @@ public enum AiProvider
Copilot,
ChatGPT,
Gemini,
+ GitHub_Copilot,
+ Grok,
Custom
}
@@ -64,7 +66,7 @@ internal class Configuration
///
/// Boolean status of the initialization.
///
- public static bool InitialEnvironment()
+ public static bool InitialEnvironment(bool setupRunning = false)
{
// Check if Edge is installed
try
@@ -79,7 +81,7 @@ public static bool InitialEnvironment()
return true;
}
- if (!CopilotDockPipeAvailable())
+ if (!IsCopilotDockPipeAvailable() && !setupRunning)
{
Logging.Log("Copilot Dock (Pipe) is not available - spawning ShellManager");
try { ShellManager = new ShellManager(); }
@@ -128,7 +130,7 @@ public static bool InitialEnvironment()
}
}
- public static bool CopilotDockPipeAvailable()
+ public static bool IsCopilotDockPipeAvailable()
{
try
{
@@ -202,7 +204,7 @@ public static List GetAiProviders()
{
var list = (from aiProvider in (AiProvider[])Enum.GetValues(typeof(AiProvider))
where aiProvider != AiProvider.Custom
- select aiProvider.ToString()).ToList();
+ select aiProvider.ToString().Replace("_", " ")).ToList();
try
{
diff --git a/GoAwayEdge/Common/Runtime/ArgumentParse.cs b/GoAwayEdge/Common/Runtime/ArgumentParse.cs
index 884c0c1..111f7f9 100644
--- a/GoAwayEdge/Common/Runtime/ArgumentParse.cs
+++ b/GoAwayEdge/Common/Runtime/ArgumentParse.cs
@@ -192,6 +192,8 @@ public static AiProvider ParseAiProvider(string argument)
"copilot" => AiProvider.Copilot,
"chatgpt" => AiProvider.ChatGPT,
"gemini" => AiProvider.Gemini,
+ "github_copilot" => AiProvider.GitHub_Copilot,
+ "grok" => AiProvider.Grok,
"custom" => AiProvider.Custom,
_ => AiProvider.Copilot // Fallback channel
};
diff --git a/GoAwayEdge/GoAwayEdge.csproj b/GoAwayEdge/GoAwayEdge.csproj
index 77d5b08..e32a552 100644
--- a/GoAwayEdge/GoAwayEdge.csproj
+++ b/GoAwayEdge/GoAwayEdge.csproj
@@ -12,7 +12,7 @@
GoAwayEdge
Exploitox
valnoxy
- 2.0.0.213
+ 2.0.0.231
Copyright © 2018 - 2024 Exploitox. All rights reserved.
https://github.com/valnoxy/GoAwayEdge
https://github.com/valnoxy/GoAwayEdge
@@ -43,10 +43,7 @@
-
- Designer
- MSBuild:Compile
-
+
@@ -55,10 +52,10 @@
-
+
-
-
+
+
diff --git a/GoAwayEdge/GoAwayEdge.csproj.user b/GoAwayEdge/GoAwayEdge.csproj.user
index 61534d1..3dd6034 100644
--- a/GoAwayEdge/GoAwayEdge.csproj.user
+++ b/GoAwayEdge/GoAwayEdge.csproj.user
@@ -45,12 +45,18 @@
Designer
+
+ Designer
+
Designer
Designer
+
+ Designer
+
Designer
diff --git a/GoAwayEdge/Localization/ResourceDictionary.de-DE.xaml b/GoAwayEdge/Localization/ResourceDictionary.de-DE.xaml
index 8bcc269..9362eab 100644
--- a/GoAwayEdge/Localization/ResourceDictionary.de-DE.xaml
+++ b/GoAwayEdge/Localization/ResourceDictionary.de-DE.xaml
@@ -20,8 +20,8 @@
Ich lehne diese Lizenz ab.
Einstellungen
- Edge Channel
- Wählen Sie den installierten Microsoft Edge Channel aus.
+ Edge Kanal
+ Wählen Sie den installierten Microsoft Edge Kanal aus.
Suchmaschine
Wählen Sie Ihre bevorzugte Suchmaschine.
Benutzerdefiniert
@@ -72,4 +72,8 @@
Deaktiviere die Weiterleitung von Suchanfragen an anderen Browsern.
GoAwayEdge wurde auf diesem System erfolgreich aktiviert.
GoAwayEdge konnte auf diesem System nicht deaktiviert werden: {0}
+ KI Anbieter
+ Wechseln Sie den Anbieter Ihrer bevorzugten KI (oder zu Ihrer bevorzugten Webseite).
+ Benutzerdefinierter KI Anbieter
+ Bitte geben Sie die URL des KI-Anbieters (oder einer Webseite) ein.
diff --git a/GoAwayEdge/Localization/ResourceDictionary.xaml b/GoAwayEdge/Localization/ResourceDictionary.xaml
index 561f724..8aea2b7 100644
--- a/GoAwayEdge/Localization/ResourceDictionary.xaml
+++ b/GoAwayEdge/Localization/ResourceDictionary.xaml
@@ -59,7 +59,7 @@
Deactivate the forwarding of search queries to other browsers.
Enable GoAwayEdge
Disable GoAwayEdge
- Change AI Provider
+ AI Provider
Change the provider to your favorite AI (or to your favorite website).
Custom AI Provider
Please enter the URL from the AI Provider (or your favorite website).
diff --git a/GoAwayEdge/UserInterface/ControlPanel/Pages/CopilotSettings.xaml b/GoAwayEdge/UserInterface/ControlPanel/Pages/CopilotSettings.xaml
index 1af8558..01f30cc 100644
--- a/GoAwayEdge/UserInterface/ControlPanel/Pages/CopilotSettings.xaml
+++ b/GoAwayEdge/UserInterface/ControlPanel/Pages/CopilotSettings.xaml
@@ -13,7 +13,10 @@
-
+
+
+
+
@@ -55,7 +58,7 @@
Text="{DynamicResource ControlPanelCustomCopilotProviderDescription}"/>
-
+
diff --git a/GoAwayEdge/UserInterface/ControlPanel/Pages/CopilotSettings.xaml.cs b/GoAwayEdge/UserInterface/ControlPanel/Pages/CopilotSettings.xaml.cs
index c582a63..32dfe94 100644
--- a/GoAwayEdge/UserInterface/ControlPanel/Pages/CopilotSettings.xaml.cs
+++ b/GoAwayEdge/UserInterface/ControlPanel/Pages/CopilotSettings.xaml.cs
@@ -18,7 +18,7 @@ public CopilotSettings()
{
CopilotProviderBox.Items.Add(aiProvider);
}
- CopilotProviderBox.SelectedItem = Configuration.Provider.ToString();
+ CopilotProviderBox.SelectedItem = Configuration.Provider.ToString().Replace("_", " ");
if (Configuration.Provider == AiProvider.Custom)
{
@@ -30,7 +30,7 @@ public CopilotSettings()
}
else
{
- CopilotProviderBox.SelectedItem = Configuration.Search.ToString();
+ CopilotProviderBox.SelectedItem = Configuration.Provider.ToString();
}
}
@@ -67,19 +67,24 @@ private void CopilotProviderBox_OnSelectionChanged(object sender, SelectionChang
case 0:
Configuration.Provider = AiProvider.Copilot;
CustomSearchPanel.Visibility = Visibility.Collapsed;
- FlushSettings();
break;
case 1:
Configuration.Provider = AiProvider.ChatGPT;
CustomSearchPanel.Visibility = Visibility.Collapsed;
- FlushSettings();
break;
case 2:
Configuration.Provider = AiProvider.Gemini;
CustomSearchPanel.Visibility = Visibility.Collapsed;
- FlushSettings();
break;
case 3:
+ Configuration.Provider = AiProvider.GitHub_Copilot;
+ CustomSearchPanel.Visibility = Visibility.Collapsed;
+ break;
+ case 4:
+ Configuration.Provider = AiProvider.Grok;
+ CustomSearchPanel.Visibility = Visibility.Collapsed;
+ break;
+ case 5:
Configuration.Provider = AiProvider.Custom;
CustomSearchPanel.Visibility = Visibility.Visible;
break;
diff --git a/GoAwayEdge/UserInterface/CopilotDock/CopilotDock.xaml.cs b/GoAwayEdge/UserInterface/CopilotDock/CopilotDock.xaml.cs
index 1018c5f..d6e9e35 100644
--- a/GoAwayEdge/UserInterface/CopilotDock/CopilotDock.xaml.cs
+++ b/GoAwayEdge/UserInterface/CopilotDock/CopilotDock.xaml.cs
@@ -20,8 +20,8 @@ public partial class CopilotDock
public CopilotDock(ShellManager shellManager, AppBarScreen screen, AppBarEdge edge, double desiredHeight, AppBarMode mode)
: base(shellManager.AppBarManager, shellManager.ExplorerHelper, shellManager.FullScreenHelper, screen, edge, mode, desiredHeight)
{
- this.MaxHeight = SystemParameters.WorkArea.Height;
- this.MinHeight = SystemParameters.WorkArea.Height;
+ MaxHeight = SystemParameters.WorkArea.Height;
+ MinHeight = SystemParameters.WorkArea.Height;
Configuration.AppBarIsAttached = mode != AppBarMode.None;
Instance = this;
@@ -49,10 +49,17 @@ private async Task InitializeWebViewAsync()
case Gemini:
WebView.Source = new Uri("https://gemini.google.com/");
break;
+ case GitHub_Copilot:
+ WebView.Source = new Uri("https://github.com/copilot");
+ break;
+ case Grok:
+ WebView.Source = new Uri("https://x.com/i/grok");
+ break;
case Custom:
if (Configuration.CustomProviderUrl != null)
WebView.Source = new Uri(Configuration.CustomProviderUrl);
break;
+ case Copilot:
default:
Logging.Log($"Failed to load Provider! Provider Value '{Configuration.Provider}' in invalid!");
throw new ArgumentOutOfRangeException();
diff --git a/GoAwayEdge/UserInterface/CopilotDock/InterfaceManager.cs b/GoAwayEdge/UserInterface/CopilotDock/InterfaceManager.cs
index a627af5..123209a 100644
--- a/GoAwayEdge/UserInterface/CopilotDock/InterfaceManager.cs
+++ b/GoAwayEdge/UserInterface/CopilotDock/InterfaceManager.cs
@@ -48,7 +48,7 @@ public static void ShowDock()
Logging.Log($"Message received: {message}");
if (message.Contains("BringToFront"))
{
- WindowManager.ShowCopilotDockAsync(Common.Configuration.ShellManager, AppBarScreen.FromPrimaryScreen(), AppBarEdge.Right, 500, mode);
+ WindowManager.ShowCopilotDockAsync(Common.Configuration.ShellManager, AppBarScreen.FromPrimaryScreen(), AppBarEdge.Right, 500, mode); // Dummy data
}
};
diff --git a/GoAwayEdge/UserInterface/CopilotDock/WindowManager.cs b/GoAwayEdge/UserInterface/CopilotDock/WindowManager.cs
index 8ebf95b..85a8e91 100644
--- a/GoAwayEdge/UserInterface/CopilotDock/WindowManager.cs
+++ b/GoAwayEdge/UserInterface/CopilotDock/WindowManager.cs
@@ -36,12 +36,6 @@ public static void ShowCopilotDockAsync(ShellManager shellManager, AppBarScreen
}
}
- private static void OnCopilotDockClosed(object sender, System.EventArgs e)
- {
- if (_copilotDockInstance != null) _copilotDockInstance.Closed -= OnCopilotDockClosed!;
- _copilotDockInstance = null;
- }
-
public static void HideCopilotDock()
{
try
diff --git a/GoAwayEdge/UserInterface/Setup/Installer.xaml.cs b/GoAwayEdge/UserInterface/Setup/Installer.xaml.cs
index 71eb733..10da43e 100644
--- a/GoAwayEdge/UserInterface/Setup/Installer.xaml.cs
+++ b/GoAwayEdge/UserInterface/Setup/Installer.xaml.cs
@@ -41,7 +41,7 @@ public Installer()
}
VersionLbl.Content = versionText;
- Configuration.InitialEnvironment();
+ Configuration.InitialEnvironment(setupRunning: true);
_welcomePage = new Welcome();
_redirectOrRemovePage = new RedirectOrRemove();
diff --git a/GoAwayEdge/UserInterface/Setup/Pages/License.xaml.cs b/GoAwayEdge/UserInterface/Setup/Pages/License.xaml.cs
index 8788a4d..c85a954 100644
--- a/GoAwayEdge/UserInterface/Setup/Pages/License.xaml.cs
+++ b/GoAwayEdge/UserInterface/Setup/Pages/License.xaml.cs
@@ -20,7 +20,7 @@ public License()
const string license = @"MIT License
-Copyright (c) 2023-2024 valnoxy
+Copyright (c) 2023-2025 valnoxy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the ""Software""), to deal
diff --git a/GoAwayEdge/UserInterface/Setup/Pages/RedirectOrRemove.xaml.cs b/GoAwayEdge/UserInterface/Setup/Pages/RedirectOrRemove.xaml.cs
index f3a6ea0..f7195c1 100644
--- a/GoAwayEdge/UserInterface/Setup/Pages/RedirectOrRemove.xaml.cs
+++ b/GoAwayEdge/UserInterface/Setup/Pages/RedirectOrRemove.xaml.cs
@@ -1,5 +1,7 @@
using System.Windows;
+using GoAwayEdge.Common.Debugging;
using Wpf.Ui;
+using Wpf.Ui.Controls;
using Wpf.Ui.Extensions;
namespace GoAwayEdge.UserInterface.Setup.Pages
@@ -20,13 +22,13 @@ private void InstallBtn_Click(object sender, RoutedEventArgs e)
Installer.ContentWindow!.NextBtn.IsEnabled = true;
}
- private void UninstallBtn_Click(object sender, RoutedEventArgs e)
+ private async void UninstallBtn_Click(object sender, RoutedEventArgs e)
{
var contentDialogService = new ContentDialogService();
contentDialogService.SetDialogHost(Installer.ContentWindow!.RootContentDialogPresenter);
- contentDialogService.ShowSimpleDialogAsync(
- new SimpleContentDialogCreateOptions()
+ var result = await contentDialogService.ShowSimpleDialogAsync(
+ new SimpleContentDialogCreateOptions
{
Title = "Warning",
Content = "Removing Microsoft Edge can cause serious system issues, as it’s deeply integrated into Windows and essential for many features, including updates, help files, and some apps. Deleting it could result in instability or broken functionality.\n\nOnly proceed if you fully understand the risks and have a reliable backup or restore point in place.",
@@ -34,6 +36,11 @@ private void UninstallBtn_Click(object sender, RoutedEventArgs e)
CloseButtonText = "Cancel"
}
);
+
+ if (result == ContentDialogResult.Primary)
+ {
+ Logging.Log("User pressed 'Remove Microsoft Edge'");
+ }
}
}
}
diff --git a/GoAwayEdge/UserInterface/Setup/Pages/Settings.xaml b/GoAwayEdge/UserInterface/Setup/Pages/Settings.xaml
index 2e4055e..4729b28 100644
--- a/GoAwayEdge/UserInterface/Setup/Pages/Settings.xaml
+++ b/GoAwayEdge/UserInterface/Setup/Pages/Settings.xaml
@@ -10,7 +10,10 @@
-
+
+
+
+
@@ -83,8 +86,11 @@
-
-
+
+
+
+
+
@@ -95,13 +101,39 @@
+ Text="{DynamicResource ControlPanelCopilotProviderTitle}" />
+ Text="{DynamicResource ControlPanelCopilotProviderDescription}" />
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GoAwayEdge/UserInterface/Setup/Pages/Settings.xaml.cs b/GoAwayEdge/UserInterface/Setup/Pages/Settings.xaml.cs
index 0bf88b0..885ee62 100644
--- a/GoAwayEdge/UserInterface/Setup/Pages/Settings.xaml.cs
+++ b/GoAwayEdge/UserInterface/Setup/Pages/Settings.xaml.cs
@@ -38,9 +38,28 @@ public Settings()
SearchEngineBox.SelectedItem = Configuration.Search.ToString();
}
+ foreach (var aiProvider in Configuration.GetAiProviders())
+ {
+ CopilotProviderBox.Items.Add(aiProvider);
+ }
+ CopilotProviderBox.SelectedItem = Configuration.Provider.ToString().Replace("_", " ");
+
+ if (Configuration.Provider == AiProvider.Custom)
+ {
+ CopilotProviderBox.SelectedItem = LocalizationManager.LocalizeValue("SettingsSearchEngineCustomItem");
+ CustomSearchPanel.Visibility = Visibility.Visible;
+ if (Configuration.CustomProviderUrl != null) QueryProviderTextBox.Text = Configuration.CustomProviderUrl;
+ CustomUrlStatus.Symbol = Uri.TryCreate(QueryProviderTextBox.Text, UriKind.Absolute, out _)
+ ? SymbolRegular.CheckmarkCircle24 : SymbolRegular.ErrorCircle24;
+ }
+ else
+ {
+ CopilotProviderBox.SelectedItem = Configuration.Search.ToString();
+ }
+
if (Configuration.NoEdgeInstalled)
{
- MsEdgeRemoveStackPanel.IsEnabled = false;
+ CopilotStackPanel.IsEnabled = false;
EdgeStackPanel.IsEnabled = false;
}
@@ -135,14 +154,55 @@ private void QueryUrlTextBox_OnTextChanged(object sender, TextChangedEventArgs e
}
}
- private void MsEdgeUninstallSwitch_OnClickUninstallSwitch_OnClick(object sender, RoutedEventArgs e)
+ private void ControlPanelSwitch_OnClick(object sender, RoutedEventArgs e)
{
- Configuration.UninstallEdge = MsEdgeUninstallSwitch.IsChecked!.Value;
+ Configuration.InstallControlPanel = ControlPanelSwitch.IsChecked!.Value;
}
- private void ControlPanelSwitch_OnClick(object sender, RoutedEventArgs e)
+ private void CopilotProviderBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
- Configuration.InstallControlPanel = ControlPanelSwitch.IsChecked!.Value;
+ switch (CopilotProviderBox.SelectedIndex)
+ {
+ case 0:
+ Configuration.Provider = AiProvider.Copilot;
+ CustomAiPanel.Visibility = Visibility.Collapsed;
+ break;
+ case 1:
+ Configuration.Provider = AiProvider.ChatGPT;
+ CustomAiPanel.Visibility = Visibility.Collapsed;
+ break;
+ case 2:
+ Configuration.Provider = AiProvider.Gemini;
+ CustomAiPanel.Visibility = Visibility.Collapsed;
+ break;
+ case 3:
+ Configuration.Provider = AiProvider.GitHub_Copilot;
+ CustomAiPanel.Visibility = Visibility.Collapsed;
+ break;
+ case 4:
+ Configuration.Provider = AiProvider.Grok;
+ CustomAiPanel.Visibility = Visibility.Collapsed;
+ break;
+ case 5:
+ Configuration.Provider = AiProvider.Custom;
+ CustomAiPanel.Visibility = Visibility.Visible;
+ break;
+ }
+ }
+
+ private void QueryProviderTextBox_OnTextChanged(object sender, TextChangedEventArgs e)
+ {
+ // Test if the URL is valid
+ if (Uri.TryCreate(QueryProviderTextBox.Text, UriKind.Absolute, out var uriResult)
+ && (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps))
+ {
+ CustomUrlStatus.Symbol = SymbolRegular.CheckmarkCircle24;
+ Configuration.CustomProviderUrl = QueryProviderTextBox.Text;
+ }
+ else
+ {
+ CustomUrlStatus.Symbol = SymbolRegular.ErrorCircle24;
+ }
}
}
}