MCPcopy Create free account
hub / github.com/bajrangCoder/setu / new_tab

Method new_tab

src/views/main_view.rs:718–746  ·  view source on GitHub ↗

Add a new tab

(&mut self, cx: &mut Context<Self>)

Source from the content-addressed store, hash-verified

716 websocket_result,
717 tab_name,
718 None,
719 window,
720 cx,
721 );
722 return;
723 }
724
725 // Derive body type from the stored request body
726 let body_type = BodyType::from_request_body(&request_data.body);
727
728 // Extract body content for text-based body types
729 let body_content: Option<String> = match &request_data.body {
730 RequestBody::Json(content) | RequestBody::Text(content) => {
731 if content.is_empty() {
732 None
733 } else {
734 Some(content.clone())
735 }
736 }
737 RequestBody::None | RequestBody::FormData(_) | RequestBody::MultipartFormData(_) => {
738 None
739 }
740 };
741
742 // Extract form data for FormUrlEncoded
743 let form_data = match &request_data.body {
744 RequestBody::FormData(data) => Some(data.clone()),
745 _ => None,
746 };
747
748 // Extract multipart data for FormData
749 let multipart_data = match &request_data.body {

Callers 3

renderMethod · 0.80
execute_commandMethod · 0.80
renderMethod · 0.80

Calls 2

newMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected