refactor: DriverSession

This commit is contained in:
lilong.129
2025-02-17 17:08:24 +08:00
parent c8d776009c
commit 29c0e1cbef
16 changed files with 377 additions and 396 deletions

View File

@@ -26,7 +26,7 @@ type IDriver interface {
// session
InitSession(capabilities option.Capabilities) error
GetSession() *Session
GetSession() *DriverSession
DeleteSession() error
// device info and status
@@ -77,6 +77,8 @@ func NewXTDriver(driver IDriver, opts ...ai.AIServiceOption) *XTDriver {
IDriver: driver,
CVService: services.ICVService,
LLMService: services.ILLMService,
screenResults: make([]*ScreenResult, 0),
}
return driverExt
}
@@ -86,4 +88,7 @@ type XTDriver struct {
IDriver
CVService ai.ICVService // OCR/CV
LLMService ai.ILLMService // LLM
// cache screenshot results
screenResults []*ScreenResult
}