Skip to content

revert set state #1014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 17, 2025
Merged
Changes from all 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
Original file line number Diff line number Diff line change
@@ -353,7 +353,8 @@ await hook.OnNotificationGenerated(inputMsg)

#region Send message
[HttpPost("/conversation/{agentId}/{conversationId}")]
public async Task<ChatResponseModel> SendMessage([FromRoute] string agentId,
public async Task<ChatResponseModel> SendMessage(
[FromRoute] string agentId,
[FromRoute] string conversationId,
[FromBody] NewMessageModel input)
{
@@ -367,8 +368,8 @@ public async Task<ChatResponseModel> SendMessage([FromRoute] string agentId,
var routing = _services.GetRequiredService<IRoutingService>();
routing.Context.SetMessageId(conversationId, inputMsg.MessageId);

conv.SetConversationId(conversationId, input.States);
SetStates(conv, input);
conv.SetConversationId(conversationId, input.States);

var response = new ChatResponseModel();


Unchanged files with check annotations Beta

public class UserActivationModel
{
public string UserName { get; set; }

Check warning on line 5 in src/Infrastructure/BotSharp.Abstraction/Users/Models/UserActivationModel.cs

GitHub Actions / build (macos-latest)

Non-nullable property 'UserName' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 5 in src/Infrastructure/BotSharp.Abstraction/Users/Models/UserActivationModel.cs

GitHub Actions / build (macos-latest)

Non-nullable property 'UserName' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 5 in src/Infrastructure/BotSharp.Abstraction/Users/Models/UserActivationModel.cs

GitHub Actions / build (windows-latest)

Non-nullable property 'UserName' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
public string VerificationCode { get; set; }
public string RegionCode { get; set; } = "CN";
}
List<User> GetUsersByAffiliateId(string affiliateId) => throw new NotImplementedException();
User? GetUserByUserName(string userName) => throw new NotImplementedException();
void UpdateUserName(string userId, string userName) => throw new NotImplementedException();
Dashboard? GetDashboard(string id = null) => throw new NotImplementedException();

Check warning on line 46 in src/Infrastructure/BotSharp.Abstraction/Repositories/IBotSharpRepository.cs

GitHub Actions / build (macos-latest)

Cannot convert null literal to non-nullable reference type.

Check warning on line 46 in src/Infrastructure/BotSharp.Abstraction/Repositories/IBotSharpRepository.cs

GitHub Actions / build (macos-latest)

Cannot convert null literal to non-nullable reference type.

Check warning on line 46 in src/Infrastructure/BotSharp.Abstraction/Repositories/IBotSharpRepository.cs

GitHub Actions / build (ubuntu-latest)

Cannot convert null literal to non-nullable reference type.

Check warning on line 46 in src/Infrastructure/BotSharp.Abstraction/Repositories/IBotSharpRepository.cs

GitHub Actions / build (ubuntu-latest)

Cannot convert null literal to non-nullable reference type.

Check warning on line 46 in src/Infrastructure/BotSharp.Abstraction/Repositories/IBotSharpRepository.cs

GitHub Actions / build (windows-latest)

Cannot convert null literal to non-nullable reference type.

Check warning on line 46 in src/Infrastructure/BotSharp.Abstraction/Repositories/IBotSharpRepository.cs

GitHub Actions / build (windows-latest)

Cannot convert null literal to non-nullable reference type.
void CreateUser(User user) => throw new NotImplementedException();
void UpdateExistUser(string userId, User user) => throw new NotImplementedException();
void UpdateUserVerified(string userId) => throw new NotImplementedException();
Task DoAction(MessageInfo message, ElementActionArgs action, BrowserActionResult result);
Task PressKey(MessageInfo message, string key);
Task<BrowserActionResult> InputUserText(BrowserActionParams actionParams);

Check warning on line 17 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 17 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 17 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 17 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 17 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 17 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'
Task<BrowserActionResult> InputUserPassword(BrowserActionParams actionParams);

Check warning on line 18 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 18 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 18 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 18 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 18 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 18 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'
Task<BrowserActionResult> ClickButton(BrowserActionParams actionParams);

Check warning on line 19 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 19 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 19 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 19 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 19 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 19 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'
Task<BrowserActionResult> ClickElement(BrowserActionParams actionParams);

Check warning on line 20 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 20 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 20 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 20 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 20 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 20 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'
Task<BrowserActionResult> ChangeListValue(BrowserActionParams actionParams);

Check warning on line 21 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 21 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 21 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 21 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 21 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 21 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'
Task<BrowserActionResult> CheckRadioButton(BrowserActionParams actionParams);

Check warning on line 22 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 22 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 22 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 22 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 22 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 22 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'
Task<BrowserActionResult> ChangeCheckbox(BrowserActionParams actionParams);

Check warning on line 23 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 23 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 23 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 23 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 23 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 23 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'
Task<BrowserActionResult> GoToPage(MessageInfo message, PageActionArgs args);
Task<string> ExtractData(BrowserActionParams actionParams);

Check warning on line 25 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 25 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (macos-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 25 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 25 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (ubuntu-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 25 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'

Check warning on line 25 in src/Infrastructure/BotSharp.Abstraction/Browsing/IWebBrowser.cs

GitHub Actions / build (windows-latest)

'BrowserActionParams' is obsolete: 'This class is deprecated, use BrowserActionArgs instead.'
Task<T> EvaluateScript<T>(string contextId, string script);
Task CloseBrowser(string contextId);
Task<bool> IsBrowserClosed(string contextId);
public class VectorUpdateModel : VectorCreateModel
{
public string Id { get; set; }

Check warning on line 5 in src/Infrastructure/BotSharp.Abstraction/VectorStorage/Models/VectorUpdateModel.cs

GitHub Actions / build (ubuntu-latest)

Non-nullable property 'Id' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 5 in src/Infrastructure/BotSharp.Abstraction/VectorStorage/Models/VectorUpdateModel.cs

GitHub Actions / build (ubuntu-latest)

Non-nullable property 'Id' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
}
protected readonly IServiceProvider _services;
protected readonly AgentSettings _settings;
public AgentHookBase(IServiceProvider services, AgentSettings settings)

Check warning on line 16 in src/Infrastructure/BotSharp.Abstraction/Agents/AgentHookBase.cs

GitHub Actions / build (windows-latest)

Non-nullable field '_agent' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
{
_services = services;
_settings = settings;