refactor(app): extract app-call-model crate
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -277,6 +277,7 @@ version = "0.1.0"
277
277
dependencies = [
278
278
"agents",
279
279
"app-base",
280
"app-call-model",
280
281
"calling",
281
282
"chatsvc",
282
283
"chrono",
@@ -327,6 +328,32 @@ dependencies = [
327
328
"x11rb",
328
329
]
329
330
331
[[package]]
332
name = "app-call-model"
333
version = "0.1.0"
334
dependencies = [
335
"agents",
336
"app-base",
337
"calling",
338
"chatsvc",
339
"chrono",
340
"directories",
341
"gpui-kit",
342
"graph",
343
"image",
344
"log",
345
"mcp",
346
"regex",
347
"serde",
348
"serde_json",
349
"session",
350
"store",
351
"teams-core",
352
"tempfile",
353
"tokio",
354
"uuid",
355
]
356
330
357
[[package]]
331
358
name = "arbitrary"
332
359
version = "1.5.0"
@@ -277,6 +277,7 @@ version = "0.1.0"277
dependencies = [277
dependencies = [278
"agents",278
"agents",279
"app-base",279
"app-base",280
"app-call-model",280
"calling",281
"calling",281
"chatsvc",282
"chatsvc",282
"chrono",283
"chrono",@@ -327,6 +328,32 @@ dependencies = [327
"x11rb",328
"x11rb",328
]329
]329
330
331
[[package]]332
name = "app-call-model"333
version = "0.1.0"334
dependencies = [335
"agents",336
"app-base",337
"calling",338
"chatsvc",339
"chrono",340
"directories",341
"gpui-kit",342
"graph",343
"image",344
"log",345
"mcp",346
"regex",347
"serde",348
"serde_json",349
"session",350
"store",351
"teams-core",352
"tempfile",353
"tokio",354
"uuid",355
]356
330
[[package]]357
[[package]]331
name = "arbitrary"358
name = "arbitrary"332
version = "1.5.0"359
version = "1.5.0"@@ -29,6 +29,7 @@ url = "2"
29
29
uuid = { version = "1", default-features = false, features = ["v4"] }
30
30
31
31
app-base = { path = "crates/app-base" }
32
app-call-model = { path = "crates/app-call-model" }
32
33
agents = { path = "crates/agents" }
33
34
session = { path = "crates/session" }
34
35
graph = { path = "crates/graph" }
@@ -58,3 +59,6 @@ opt-level = 1
58
59
59
60
[profile.release.package.app-base]
60
61
opt-level = 1
62
63
[profile.release.package.app-call-model]
64
opt-level = 1
@@ -29,6 +29,7 @@ url = "2"29
uuid = { version = "1", default-features = false, features = ["v4"] }29
uuid = { version = "1", default-features = false, features = ["v4"] }30
30
31
app-base = { path = "crates/app-base" }31
app-base = { path = "crates/app-base" }32
app-call-model = { path = "crates/app-call-model" }32
agents = { path = "crates/agents" }33
agents = { path = "crates/agents" }33
session = { path = "crates/session" }34
session = { path = "crates/session" }34
graph = { path = "crates/graph" }35
graph = { path = "crates/graph" }@@ -58,3 +59,6 @@ opt-level = 158
59
59
[profile.release.package.app-base]60
[profile.release.package.app-base]60
opt-level = 161
opt-level = 162
63
[profile.release.package.app-call-model]64
opt-level = 1@@ -0,0 +1,31 @@
1
[package]
2
name = "app-call-model"
3
edition.workspace = true
4
version.workspace = true
5
license.workspace = true
6
publish.workspace = true
7
8
[dev-dependencies]
9
gpui-kit = { workspace = true, features = ["test-support"] }
10
tempfile.workspace = true
11
12
[dependencies]
13
agents.workspace = true
14
app-base.workspace = true
15
calling.workspace = true
16
chatsvc.workspace = true
17
chrono.workspace = true
18
directories.workspace = true
19
gpui-kit.workspace = true
20
graph.workspace = true
21
log = "0.4"
22
mcp.workspace = true
23
regex.workspace = true
24
serde.workspace = true
25
serde_json.workspace = true
26
session.workspace = true
27
store.workspace = true
28
teams-core.workspace = true
29
tokio.workspace = true
30
uuid.workspace = true
31
image = { version = "0.25", default-features = false, features = ["bmp", "gif", "jpeg", "png", "webp"] }
@@ -0,0 +1,31 @@1
[package]2
name = "app-call-model"3
edition.workspace = true4
version.workspace = true5
license.workspace = true6
publish.workspace = true7
8
[dev-dependencies]9
gpui-kit = { workspace = true, features = ["test-support"] }10
tempfile.workspace = true11
12
[dependencies]13
agents.workspace = true14
app-base.workspace = true15
calling.workspace = true16
chatsvc.workspace = true17
chrono.workspace = true18
directories.workspace = true19
gpui-kit.workspace = true20
graph.workspace = true21
log = "0.4"22
mcp.workspace = true23
regex.workspace = true24
serde.workspace = true25
serde_json.workspace = true26
session.workspace = true27
store.workspace = true28
teams-core.workspace = true29
tokio.workspace = true30
uuid.workspace = true31
image = { version = "0.25", default-features = false, features = ["bmp", "gif", "jpeg", "png", "webp"] }@@ -277,7 +277,7 @@ pub fn start_demo_call(script: DemoCall) -> CallHandle {
277
277
278
278
pub fn start_demo_scene_call(script: DemoCall, scene: DemoScene) -> CallHandle {
279
279
let (handle, control) = call_channel();
280
crate::runtime::handle().spawn(run_demo_call(control, script, scene));
280
app_base::runtime::handle().spawn(run_demo_call(control, script, scene));
281
281
handle
282
282
}
283
283
@@ -277,7 +277,7 @@ pub fn start_demo_call(script: DemoCall) -> CallHandle {277
277
278
pub fn start_demo_scene_call(script: DemoCall, scene: DemoScene) -> CallHandle {278
pub fn start_demo_scene_call(script: DemoCall, scene: DemoScene) -> CallHandle {279
let (handle, control) = call_channel();279
let (handle, control) = call_channel();280
crate::runtime::handle().spawn(run_demo_call(control, script, scene));280
app_base::runtime::handle().spawn(run_demo_call(control, script, scene));281
handle281
handle282
}282
}283
283
@@ -0,0 +1,24 @@
1
pub mod agenda;
2
pub mod background;
3
pub mod bubbles;
4
pub mod caption_style;
5
pub mod demo;
6
pub mod demo_scene;
7
pub mod fullscreen;
8
pub mod health;
9
pub mod media;
10
pub mod mic;
11
pub mod model;
12
pub mod options_dialog;
13
pub mod people;
14
pub mod pictures;
15
pub mod preview;
16
pub mod push_to_talk;
17
pub mod record_rights;
18
pub mod recording_menu;
19
pub mod report;
20
pub mod ring;
21
pub mod share_view;
22
pub mod stage_layout;
23
pub mod transcript;
24
pub mod view_settings;
@@ -0,0 +1,24 @@1
pub mod agenda;2
pub mod background;3
pub mod bubbles;4
pub mod caption_style;5
pub mod demo;6
pub mod demo_scene;7
pub mod fullscreen;8
pub mod health;9
pub mod media;10
pub mod mic;11
pub mod model;12
pub mod options_dialog;13
pub mod people;14
pub mod pictures;15
pub mod preview;16
pub mod push_to_talk;17
pub mod record_rights;18
pub mod recording_menu;19
pub mod report;20
pub mod ring;21
pub mod share_view;22
pub mod stage_layout;23
pub mod transcript;24
pub mod view_settings;@@ -1152,7 +1152,7 @@ impl CallModel {
1152
1152
!self.share_sources.is_empty() && self.is_live()
1153
1153
}
1154
1154
1155
pub(super) fn is_live(&self) -> bool {
1155
pub fn is_live(&self) -> bool {
1156
1156
matches!(
1157
1157
self.state,
1158
1158
CallState::Connected { .. } | CallState::Reconnecting { .. }
@@ -1152,7 +1152,7 @@ impl CallModel {1152
!self.share_sources.is_empty() && self.is_live()1152
!self.share_sources.is_empty() && self.is_live()1153
}1153
}1154
1154
1155
pub(super) fn is_live(&self) -> bool {1155
pub fn is_live(&self) -> bool {1156
matches!(1156
matches!(1157
self.state,1157
self.state,1158
CallState::Connected { .. } | CallState::Reconnecting { .. }1158
CallState::Connected { .. } | CallState::Reconnecting { .. }@@ -7,7 +7,7 @@ use super::markdown;
7
7
use super::scrub::Scrubber;
8
8
use super::series::{level_name, limitation_name};
9
9
use super::{CallRecorder, FeatureRecord, Outcome};
10
use crate::call::model::CallKind;
10
use crate::model::CallKind;
11
11
12
12
const SCHEMA: u32 = 1;
13
13
const FILE_STAMP: &str = "%Y%m%dT%H%M%SZ";
@@ -272,7 +272,7 @@ impl CallRecorder {
272
272
schema: SCHEMA,
273
273
app: AppInfo {
274
274
version: env!("CARGO_PKG_VERSION"),
275
build: env!("TEAMS_BUILD_VERSION"),
275
build: app_base::version::build_version(),
276
276
os: std::env::consts::OS,
277
277
arch: std::env::consts::ARCH,
278
278
demo: self.demo,
@@ -7,7 +7,7 @@ use super::markdown;7
use super::scrub::Scrubber;7
use super::scrub::Scrubber;8
use super::series::{level_name, limitation_name};8
use super::series::{level_name, limitation_name};9
use super::{CallRecorder, FeatureRecord, Outcome};9
use super::{CallRecorder, FeatureRecord, Outcome};10
use crate::call::model::CallKind;10
use crate::model::CallKind;11
11
12
const SCHEMA: u32 = 1;12
const SCHEMA: u32 = 1;13
const FILE_STAMP: &str = "%Y%m%dT%H%M%SZ";13
const FILE_STAMP: &str = "%Y%m%dT%H%M%SZ";@@ -272,7 +272,7 @@ impl CallRecorder {272
schema: SCHEMA,272
schema: SCHEMA,273
app: AppInfo {273
app: AppInfo {274
version: env!("CARGO_PKG_VERSION"),274
version: env!("CARGO_PKG_VERSION"),275
build: env!("TEAMS_BUILD_VERSION"),275
build: app_base::version::build_version(),276
os: std::env::consts::OS,276
os: std::env::consts::OS,277
arch: std::env::consts::ARCH,277
arch: std::env::consts::ARCH,278
demo: self.demo,278
demo: self.demo,@@ -19,6 +19,7 @@ tempfile.workspace = true
19
19
20
20
[dependencies]
21
21
app-base.workspace = true
22
app-call-model.workspace = true
22
23
agents.workspace = true
23
24
calling.workspace = true
24
25
chatsvc.workspace = true
@@ -19,6 +19,7 @@ tempfile.workspace = true19
19
20
[dependencies]20
[dependencies]21
app-base.workspace = true21
app-base.workspace = true22
app-call-model.workspace = true22
agents.workspace = true23
agents.workspace = true23
calling.workspace = true24
calling.workspace = true24
chatsvc.workspace = true25
chatsvc.workspace = true@@ -1,45 +1,27 @@
1
1
mod actions;
2
mod agenda;
3
mod background;
4
mod bubbles;
5
2
mod calendar;
6
mod caption_style;
7
3
mod consult;
8
mod demo;
9
mod demo_scene;
10
4
mod features;
11
mod health;
12
mod fullscreen;
13
5
mod history;
14
6
mod join;
15
7
mod launcher;
16
8
mod list;
17
mod media;
18
mod mic;
19
mod model;
20
mod options_dialog;
21
9
mod overlay;
22
10
mod overlay_layout;
23
mod people;
24
11
mod people_actions;
25
mod pictures;
26
12
mod prejoin;
27
mod preview;
28
mod push_to_talk;
29
mod recording_menu;
30
13
mod record_load;
31
mod record_rights;
32
mod report;
33
14
mod reminder;
34
15
mod share_actions;
35
mod share_view;
36
mod ring;
37
16
mod schedule;
38
mod stage_layout;
39
17
mod target;
40
mod transcript;
41
18
mod view_actions;
42
mod view_settings;
19
20
use app_call_model::{
21
agenda, background, bubbles, caption_style, demo, fullscreen, health, media, mic,
22
model, options_dialog, people, preview, record_rights,
23
recording_menu, report, ring, share_view, stage_layout, transcript, view_settings,
24
};
43
25
44
26
pub use actions::{load_camera, load_camera_effects, load_input, load_output, load_share_sound};
45
27
pub use mic::load_mic;
@@ -1,45 +1,27 @@1
mod actions;1
mod actions;2
mod agenda;3
mod background;4
mod bubbles;5
mod calendar;2
mod calendar;6
mod caption_style;7
mod consult;3
mod consult;8
mod demo;9
mod demo_scene;10
mod features;4
mod features;11
mod health;12
mod fullscreen;13
mod history;5
mod history;14
mod join;6
mod join;15
mod launcher;7
mod launcher;16
mod list;8
mod list;17
mod media;18
mod mic;19
mod model;20
mod options_dialog;21
mod overlay;9
mod overlay;22
mod overlay_layout;10
mod overlay_layout;23
mod people;24
mod people_actions;11
mod people_actions;25
mod pictures;26
mod prejoin;12
mod prejoin;27
mod preview;28
mod push_to_talk;29
mod recording_menu;30
mod record_load;13
mod record_load;31
mod record_rights;32
mod report;33
mod reminder;14
mod reminder;34
mod share_actions;15
mod share_actions;35
mod share_view;36
mod ring;37
mod schedule;16
mod schedule;38
mod stage_layout;39
mod target;17
mod target;40
mod transcript;41
mod view_actions;18
mod view_actions;42
mod view_settings;19
20
use app_call_model::{21
agenda, background, bubbles, caption_style, demo, fullscreen, health, media, mic,22
model, options_dialog, people, preview, record_rights,23
recording_menu, report, ring, share_view, stage_layout, transcript, view_settings,24
};43
25
44
pub use actions::{load_camera, load_camera_effects, load_input, load_output, load_share_sound};26
pub use actions::{load_camera, load_camera_effects, load_input, load_output, load_share_sound};45
pub use mic::load_mic;27
pub use mic::load_mic;