Skip to content

Commit 9c620b1

Browse files
authored
Merge pull request #512 from Qtoss-AI/master
WebDriver improvements.
2 parents c544ddd + 773b7a9 commit 9c620b1

File tree

17 files changed

+193
-43
lines changed

17 files changed

+193
-43
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace BotSharp.Abstraction.Agents.Enums;
2+
3+
public class BuiltInAgentId
4+
{
5+
public const string AIAssistant = "01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a";
6+
public const string Chatbot = "01e2fc5c-2c89-4ec7-8470-7688608b496c";
7+
public const string HumanSupport = "01dcc3e5-0af7-49e6-ad7a-a760bd12dc4b";
8+
}

src/Infrastructure/BotSharp.Abstraction/BotSharp.Abstraction.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
<OutputPath>$(SolutionDir)packages</OutputPath>
1111
</PropertyGroup>
1212

13+
<ItemGroup>
14+
<Compile Remove="packages\**" />
15+
<EmbeddedResource Remove="packages\**" />
16+
<None Remove="packages\**" />
17+
</ItemGroup>
18+
1319
<ItemGroup>
1420
<None Include="..\..\..\arts\Icon.png">
1521
<Pack>True</Pack>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace BotSharp.Abstraction.Browsing.Models;
2+
3+
public class BrowserActionArgs
4+
{
5+
6+
}

src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionResult.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public class BrowserActionResult
88
public string Selector { get; set; }
99
public string Body { get; set; }
1010
public bool IsHighlighted { get; set; }
11+
public DateTime? ExecutedAt { get; set; } = DateTime.UtcNow;
1112

1213
public override string ToString()
1314
{

src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementLocatingArgs.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ public class ElementLocatingArgs
3131
/// Draw outline around the element
3232
/// </summary>
3333
public bool Highlight { get; set; }
34+
public string HighlightColor { get; set; } = "red";
3435
}

src/Infrastructure/BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,11 @@ public class PageActionArgs
1111

1212
public string Url { get; set; } = null!;
1313
public bool OpenNewTab { get; set; } = false;
14+
15+
/// <summary>
16+
/// On page data fetched
17+
/// </summary>
18+
public DataFetched? OnDataFetched { get; set; }
1419
}
20+
21+
public delegate void DataFetched(string url, string data);

src/Infrastructure/BotSharp.Abstraction/Utilities/Pagination.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public int Offset
3737
{
3838
get { return (Page - 1) * Size; }
3939
}
40+
41+
public bool ReturnTotal { get; set; } = true;
4042
}
4143

4244
public class PagedItems<T>

src/Infrastructure/BotSharp.Core/Agents/AgentPlugin.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public class AgentPlugin : IBotSharpPlugin
1717

1818
public string[] AgentIds => new string[]
1919
{
20-
"01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a",
21-
"01e2fc5c-2c89-4ec7-8470-7688608b496c",
22-
"01dcc3e5-0af7-49e6-ad7a-a760bd12dc4b"
20+
BuiltInAgentId.AIAssistant,
21+
BuiltInAgentId.Chatbot,
22+
BuiltInAgentId.HumanSupport
2323
};
2424

2525
public object GetNewSettingsInstance() =>

src/Infrastructure/BotSharp.Core/BotSharp.Core.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@
176176

177177
<ItemGroup>
178178
<PackageReference Include="Aspects.Cache" Version="2.0.4" />
179-
<PackageReference Include="Colorful.Console" Version="1.2.15" />
180-
<PackageReference Include="EntityFrameworkCore.BootKit" Version="8.3.1" />
179+
<PackageReference Include="EntityFrameworkCore.BootKit" Version="8.4.2" />
181180
<PackageReference Include="Fluid.Core" Version="2.8.0" />
182181
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
183182
<PackageReference Include="Nanoid" Version="3.0.0" />

src/Infrastructure/BotSharp.Core/Using.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@
3636
global using BotSharp.Core.Infrastructures;
3737
global using BotSharp.Core.Users.Services;
3838
global using Aspects.Cache;
39-
global using Console = Colorful.Console;

0 commit comments

Comments
 (0)