MCPcopy Create free account
hub / github.com/chieapp/chie / constructor

Method constructor

src/view/chat-window.ts:15–31  ·  view source on GitHub ↗
(assistant: Assistant)

Source from the content-addressed store, hash-verified

13 chatView: BaseView<WebService<WebAPI>>;
14
15 constructor(assistant: Assistant) {
16 super({
17 viewClass: assistant.viewClass,
18 useClassicBackground: true,
19 });
20 this.assistant = assistant;
21
22 this.window.setTitle(assistant.service.name);
23 this.window.onFocus = () => this.chatView.onFocus();
24
25 this.chatView = new assistant.viewClass();
26 this.chatView.view.setStyle({flex: 1});
27 this.contentView.addChildView(this.chatView.view);
28 this.window.setContentSize(this.chatView.getSizeFromMainViewSize({width: 400, height: 400}));
29
30 this.chatView.loadService(assistant.service);
31 }
32
33 destructor() {
34 super.destructor();

Callers

nothing calls this directly

Calls 3

onFocusMethod · 0.80
setTitleMethod · 0.45
loadServiceMethod · 0.45

Tested by

no test coverage detected