()
| 73 | } |
| 74 | |
| 75 | serialize() { |
| 76 | const data: AssistantManagerData = {}; |
| 77 | for (const assistant of this.#assistants) { |
| 78 | const item: AssistantManagerDataItem = { |
| 79 | serviceName: assistant.service.constructor.name, |
| 80 | service: assistant.service.serialize(), |
| 81 | view: assistant.viewClass.name, |
| 82 | }; |
| 83 | if (assistant.shortcut) |
| 84 | item.shortcut = assistant.shortcut; |
| 85 | if (assistant.tray) { |
| 86 | item.hasTray = true; |
| 87 | if (assistant.trayIcon != assistant.service.icon) |
| 88 | item.trayIcon = assistant.trayIcon.getChieURL(); |
| 89 | } |
| 90 | data[assistant.id] = item; |
| 91 | } |
| 92 | return data; |
| 93 | } |
| 94 | |
| 95 | createAssistant(name: string, serviceName: string, credential: APICredential, viewClass: BaseViewType, options?: Partial<WebServiceOptions>) { |
| 96 | const service = serviceManager.createService(name, serviceName, credential, options); |
nothing calls this directly
no test coverage detected