chrome-devtools-frontend 1.0.1645245 → 1.0.1646714

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.agents/skills/devtools-source-maps/SKILL.md +124 -0
  2. package/SECURITY.md +1 -1
  3. package/docs/README.md +1 -0
  4. package/docs/using_source_maps.md +159 -0
  5. package/front_end/core/host/AidaClientTypes.ts +2 -0
  6. package/front_end/core/host/UserMetrics.ts +2 -1
  7. package/front_end/core/root/Runtime.ts +10 -0
  8. package/front_end/core/sdk/DebuggerModel.ts +7 -9
  9. package/front_end/core/sdk/NetworkRequest.ts +0 -24
  10. package/front_end/generated/InspectorBackendCommands.ts +1 -1
  11. package/front_end/generated/SupportedCSSProperties.js +279 -0
  12. package/front_end/generated/protocol.ts +0 -1
  13. package/front_end/models/ai_assistance/AiAgent2.ts +43 -11
  14. package/front_end/models/ai_assistance/AiConversation.ts +4 -2
  15. package/front_end/models/ai_assistance/AiOrigins.ts +63 -2
  16. package/front_end/models/ai_assistance/README.md +15 -4
  17. package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -2
  18. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -2
  19. package/front_end/models/ai_assistance/agents/FileAgent.ts +9 -42
  20. package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +2 -2
  21. package/front_end/models/ai_assistance/agents/NetworkAgent.ts +9 -133
  22. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +10 -2
  23. package/front_end/models/ai_assistance/agents/README.md +7 -0
  24. package/front_end/models/ai_assistance/agents/StorageAgent.ts +45 -0
  25. package/front_end/models/ai_assistance/ai_assistance.ts +8 -0
  26. package/front_end/models/ai_assistance/contexts/FileContext.ts +45 -0
  27. package/front_end/models/ai_assistance/contexts/RequestContext.snapshot.txt +48 -0
  28. package/front_end/models/ai_assistance/contexts/RequestContext.ts +116 -0
  29. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +2 -1
  30. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  31. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +2 -0
  32. package/front_end/models/ai_assistance/skills/network.md +16 -0
  33. package/front_end/models/ai_assistance/skills/styling.md +1 -1
  34. package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +118 -0
  35. package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +124 -0
  36. package/front_end/models/ai_assistance/tools/README.md +1 -1
  37. package/front_end/models/ai_assistance/tools/Tool.ts +2 -0
  38. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +4 -0
  39. package/front_end/models/emulation/EmulatedDevices.ts +430 -12
  40. package/front_end/models/trace/handlers/NetworkRequestsHandler.ts +15 -11
  41. package/front_end/models/web_mcp/WebMCPModel.ts +8 -48
  42. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +14 -13
  43. package/front_end/panels/ai_assistance/components/ChatInput.ts +4 -4
  44. package/front_end/panels/application/ApplicationPanelSidebar.ts +25 -0
  45. package/front_end/panels/application/WebMCPTreeElement.ts +8 -0
  46. package/front_end/panels/application/WebMCPView.ts +40 -70
  47. package/front_end/panels/application/components/AdsView.ts +31 -28
  48. package/front_end/panels/application/components/adsView.css +6 -0
  49. package/front_end/panels/common/ExtensionServer.ts +5 -0
  50. package/front_end/panels/profiler/IsolateSelector.ts +4 -2
  51. package/front_end/panels/profiler/ProfileLauncherView.ts +194 -126
  52. package/front_end/panels/profiler/ProfilesPanel.ts +1 -3
  53. package/front_end/third_party/chromium/README.chromium +1 -1
  54. package/front_end/ui/legacy/components/utils/Linkifier.ts +10 -0
  55. package/front_end/ui/visual_logging/KnownContextValues.ts +9 -0
  56. package/package.json +1 -1
@@ -732,6 +732,72 @@ const emulatedDevices = [
732
732
  },
733
733
  {
734
734
  'order': 15,
735
+ 'show-by-default': false,
736
+ 'title': 'iPhone 14',
737
+ 'screen': {
738
+ 'horizontal': {
739
+ 'width': 844,
740
+ 'height': 390,
741
+ },
742
+ 'device-pixel-ratio': 3,
743
+ 'vertical': {
744
+ 'width': 390,
745
+ 'height': 844,
746
+ },
747
+ },
748
+ 'capabilities': ['touch', 'mobile'],
749
+ 'user-agent':
750
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
751
+ 'user-agent-metadata':
752
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
753
+ 'type': 'phone',
754
+ },
755
+ {
756
+ 'order': 16,
757
+ 'show-by-default': false,
758
+ 'title': 'iPhone 14 Plus',
759
+ 'screen': {
760
+ 'horizontal': {
761
+ 'width': 926,
762
+ 'height': 428,
763
+ },
764
+ 'device-pixel-ratio': 3,
765
+ 'vertical': {
766
+ 'width': 428,
767
+ 'height': 926,
768
+ },
769
+ },
770
+ 'capabilities': ['touch', 'mobile'],
771
+ 'user-agent':
772
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
773
+ 'user-agent-metadata':
774
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
775
+ 'type': 'phone',
776
+ },
777
+ {
778
+ 'order': 17,
779
+ 'show-by-default': false,
780
+ 'title': 'iPhone 14 Pro',
781
+ 'screen': {
782
+ 'horizontal': {
783
+ 'width': 852,
784
+ 'height': 393,
785
+ },
786
+ 'device-pixel-ratio': 3,
787
+ 'vertical': {
788
+ 'width': 393,
789
+ 'height': 852,
790
+ },
791
+ },
792
+ 'capabilities': ['touch', 'mobile'],
793
+ 'user-agent':
794
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
795
+ 'user-agent-metadata':
796
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
797
+ 'type': 'phone',
798
+ },
799
+ {
800
+ 'order': 18,
735
801
  'show-by-default': true,
736
802
  'title': 'iPhone 14 Pro Max',
737
803
  'screen': {
@@ -753,7 +819,205 @@ const emulatedDevices = [
753
819
  'type': 'phone',
754
820
  },
755
821
  {
756
- 'order': 16,
822
+ 'order': 19,
823
+ 'show-by-default': false,
824
+ 'title': 'iPhone 15',
825
+ 'screen': {
826
+ 'horizontal': {
827
+ 'width': 852,
828
+ 'height': 393,
829
+ },
830
+ 'device-pixel-ratio': 3,
831
+ 'vertical': {
832
+ 'width': 393,
833
+ 'height': 852,
834
+ },
835
+ },
836
+ 'capabilities': ['touch', 'mobile'],
837
+ 'user-agent':
838
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
839
+ 'user-agent-metadata':
840
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
841
+ 'type': 'phone',
842
+ },
843
+ {
844
+ 'order': 20,
845
+ 'show-by-default': false,
846
+ 'title': 'iPhone 15 Plus',
847
+ 'screen': {
848
+ 'horizontal': {
849
+ 'width': 932,
850
+ 'height': 430,
851
+ },
852
+ 'device-pixel-ratio': 3,
853
+ 'vertical': {
854
+ 'width': 430,
855
+ 'height': 932,
856
+ },
857
+ },
858
+ 'capabilities': ['touch', 'mobile'],
859
+ 'user-agent':
860
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
861
+ 'user-agent-metadata':
862
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
863
+ 'type': 'phone',
864
+ },
865
+ {
866
+ 'order': 21,
867
+ 'show-by-default': false,
868
+ 'title': 'iPhone 15 Pro',
869
+ 'screen': {
870
+ 'horizontal': {
871
+ 'width': 852,
872
+ 'height': 393,
873
+ },
874
+ 'device-pixel-ratio': 3,
875
+ 'vertical': {
876
+ 'width': 393,
877
+ 'height': 852,
878
+ },
879
+ },
880
+ 'capabilities': ['touch', 'mobile'],
881
+ 'user-agent':
882
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
883
+ 'user-agent-metadata':
884
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
885
+ 'type': 'phone',
886
+ },
887
+ {
888
+ 'order': 22,
889
+ 'show-by-default': true,
890
+ 'title': 'iPhone 15 Pro Max',
891
+ 'screen': {
892
+ 'horizontal': {
893
+ 'width': 932,
894
+ 'height': 430,
895
+ },
896
+ 'device-pixel-ratio': 3,
897
+ 'vertical': {
898
+ 'width': 430,
899
+ 'height': 932,
900
+ },
901
+ },
902
+ 'capabilities': ['touch', 'mobile'],
903
+ 'user-agent':
904
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
905
+ 'user-agent-metadata':
906
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
907
+ 'type': 'phone',
908
+ },
909
+ {
910
+ 'order': 23,
911
+ 'show-by-default': false,
912
+ 'title': 'iPhone 16e',
913
+ 'screen': {
914
+ 'horizontal': {
915
+ 'width': 844,
916
+ 'height': 390,
917
+ },
918
+ 'device-pixel-ratio': 3,
919
+ 'vertical': {
920
+ 'width': 390,
921
+ 'height': 844,
922
+ },
923
+ },
924
+ 'capabilities': ['touch', 'mobile'],
925
+ 'user-agent':
926
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
927
+ 'user-agent-metadata':
928
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
929
+ 'type': 'phone',
930
+ },
931
+ {
932
+ 'order': 24,
933
+ 'show-by-default': false,
934
+ 'title': 'iPhone 16',
935
+ 'screen': {
936
+ 'horizontal': {
937
+ 'width': 852,
938
+ 'height': 393,
939
+ },
940
+ 'device-pixel-ratio': 3,
941
+ 'vertical': {
942
+ 'width': 393,
943
+ 'height': 852,
944
+ },
945
+ },
946
+ 'capabilities': ['touch', 'mobile'],
947
+ 'user-agent':
948
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
949
+ 'user-agent-metadata':
950
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
951
+ 'type': 'phone',
952
+ },
953
+ {
954
+ 'order': 25,
955
+ 'show-by-default': false,
956
+ 'title': 'iPhone 16 Plus',
957
+ 'screen': {
958
+ 'horizontal': {
959
+ 'width': 932,
960
+ 'height': 430,
961
+ },
962
+ 'device-pixel-ratio': 3,
963
+ 'vertical': {
964
+ 'width': 430,
965
+ 'height': 932,
966
+ },
967
+ },
968
+ 'capabilities': ['touch', 'mobile'],
969
+ 'user-agent':
970
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
971
+ 'user-agent-metadata':
972
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
973
+ 'type': 'phone',
974
+ },
975
+ {
976
+ 'order': 26,
977
+ 'show-by-default': false,
978
+ 'title': 'iPhone 16 Pro',
979
+ 'screen': {
980
+ 'horizontal': {
981
+ 'width': 874,
982
+ 'height': 402,
983
+ },
984
+ 'device-pixel-ratio': 3,
985
+ 'vertical': {
986
+ 'width': 402,
987
+ 'height': 874,
988
+ },
989
+ },
990
+ 'capabilities': ['touch', 'mobile'],
991
+ 'user-agent':
992
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
993
+ 'user-agent-metadata':
994
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
995
+ 'type': 'phone',
996
+ },
997
+ {
998
+ 'order': 27,
999
+ 'show-by-default': true,
1000
+ 'title': 'iPhone 16 Pro Max',
1001
+ 'screen': {
1002
+ 'horizontal': {
1003
+ 'width': 956,
1004
+ 'height': 440,
1005
+ },
1006
+ 'device-pixel-ratio': 3,
1007
+ 'vertical': {
1008
+ 'width': 440,
1009
+ 'height': 956,
1010
+ },
1011
+ },
1012
+ 'capabilities': ['touch', 'mobile'],
1013
+ 'user-agent':
1014
+ 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1',
1015
+ 'user-agent-metadata':
1016
+ {'platform': 'iOS', 'platformVersion': '18.5', 'architecture': '', 'model': 'iPhone', 'mobile': true},
1017
+ 'type': 'phone',
1018
+ },
1019
+ {
1020
+ 'order': 28,
757
1021
  'show-by-default': false,
758
1022
  'title': 'Pixel 3 XL',
759
1023
  'screen': {
@@ -775,7 +1039,7 @@ const emulatedDevices = [
775
1039
  'type': 'phone',
776
1040
  },
777
1041
  {
778
- 'order': 18,
1042
+ 'order': 30,
779
1043
  'show-by-default': true,
780
1044
  'title': 'Pixel 7',
781
1045
  'screen': {
@@ -797,7 +1061,161 @@ const emulatedDevices = [
797
1061
  'type': 'phone',
798
1062
  },
799
1063
  {
800
- 'order': 20,
1064
+ 'order': 31,
1065
+ 'show-by-default': true,
1066
+ 'title': 'Pixel 8',
1067
+ 'screen': {
1068
+ 'horizontal': {
1069
+ 'width': 915,
1070
+ 'height': 412,
1071
+ },
1072
+ 'device-pixel-ratio': 2.625,
1073
+ 'vertical': {
1074
+ 'width': 412,
1075
+ 'height': 915,
1076
+ },
1077
+ },
1078
+ 'capabilities': ['touch', 'mobile'],
1079
+ 'user-agent':
1080
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1081
+ 'user-agent-metadata':
1082
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 8', 'mobile': true},
1083
+ 'type': 'phone',
1084
+ },
1085
+ {
1086
+ 'order': 32,
1087
+ 'show-by-default': false,
1088
+ 'title': 'Pixel 8 Pro',
1089
+ 'screen': {
1090
+ 'horizontal': {
1091
+ 'width': 997,
1092
+ 'height': 448,
1093
+ },
1094
+ 'device-pixel-ratio': 3,
1095
+ 'vertical': {
1096
+ 'width': 448,
1097
+ 'height': 997,
1098
+ },
1099
+ },
1100
+ 'capabilities': ['touch', 'mobile'],
1101
+ 'user-agent':
1102
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 8 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1103
+ 'user-agent-metadata':
1104
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 8 Pro', 'mobile': true},
1105
+ 'type': 'phone',
1106
+ },
1107
+ {
1108
+ 'order': 33,
1109
+ 'show-by-default': false,
1110
+ 'title': 'Pixel 8a',
1111
+ 'screen': {
1112
+ 'horizontal': {
1113
+ 'width': 915,
1114
+ 'height': 412,
1115
+ },
1116
+ 'device-pixel-ratio': 2.625,
1117
+ 'vertical': {
1118
+ 'width': 412,
1119
+ 'height': 915,
1120
+ },
1121
+ },
1122
+ 'capabilities': ['touch', 'mobile'],
1123
+ 'user-agent':
1124
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 8a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1125
+ 'user-agent-metadata':
1126
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 8a', 'mobile': true},
1127
+ 'type': 'phone',
1128
+ },
1129
+ {
1130
+ 'order': 34,
1131
+ 'show-by-default': true,
1132
+ 'title': 'Pixel 9',
1133
+ 'screen': {
1134
+ 'horizontal': {
1135
+ 'width': 924,
1136
+ 'height': 412,
1137
+ },
1138
+ 'device-pixel-ratio': 2.625,
1139
+ 'vertical': {
1140
+ 'width': 412,
1141
+ 'height': 924,
1142
+ },
1143
+ },
1144
+ 'capabilities': ['touch', 'mobile'],
1145
+ 'user-agent':
1146
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1147
+ 'user-agent-metadata':
1148
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 9', 'mobile': true},
1149
+ 'type': 'phone',
1150
+ },
1151
+ {
1152
+ 'order': 35,
1153
+ 'show-by-default': false,
1154
+ 'title': 'Pixel 9 Pro',
1155
+ 'screen': {
1156
+ 'horizontal': {
1157
+ 'width': 952,
1158
+ 'height': 427,
1159
+ },
1160
+ 'device-pixel-ratio': 3,
1161
+ 'vertical': {
1162
+ 'width': 427,
1163
+ 'height': 952,
1164
+ },
1165
+ },
1166
+ 'capabilities': ['touch', 'mobile'],
1167
+ 'user-agent':
1168
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 9 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1169
+ 'user-agent-metadata':
1170
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 9 Pro', 'mobile': true},
1171
+ 'type': 'phone',
1172
+ },
1173
+ {
1174
+ 'order': 36,
1175
+ 'show-by-default': false,
1176
+ 'title': 'Pixel 9 Pro XL',
1177
+ 'screen': {
1178
+ 'horizontal': {
1179
+ 'width': 997,
1180
+ 'height': 448,
1181
+ },
1182
+ 'device-pixel-ratio': 3,
1183
+ 'vertical': {
1184
+ 'width': 448,
1185
+ 'height': 997,
1186
+ },
1187
+ },
1188
+ 'capabilities': ['touch', 'mobile'],
1189
+ 'user-agent':
1190
+ 'Mozilla/5.0 (Linux; Android 14; Pixel 9 Pro XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1191
+ 'user-agent-metadata':
1192
+ {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'Pixel 9 Pro XL', 'mobile': true},
1193
+ 'type': 'phone',
1194
+ },
1195
+ {
1196
+ 'order': 37,
1197
+ 'show-by-default': true,
1198
+ 'title': 'Pixel 10',
1199
+ 'screen': {
1200
+ 'horizontal': {
1201
+ 'width': 924,
1202
+ 'height': 412,
1203
+ },
1204
+ 'device-pixel-ratio': 2.625,
1205
+ 'vertical': {
1206
+ 'width': 412,
1207
+ 'height': 924,
1208
+ },
1209
+ },
1210
+ 'capabilities': ['touch', 'mobile'],
1211
+ 'user-agent':
1212
+ 'Mozilla/5.0 (Linux; Android 16; Pixel 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
1213
+ 'user-agent-metadata':
1214
+ {'platform': 'Android', 'platformVersion': '16', 'architecture': '', 'model': 'Pixel 10', 'mobile': true},
1215
+ 'type': 'phone',
1216
+ },
1217
+ {
1218
+ 'order': 38,
801
1219
  'show-by-default': true,
802
1220
  'title': 'Samsung Galaxy S8+',
803
1221
  'screen': {
@@ -819,7 +1237,7 @@ const emulatedDevices = [
819
1237
  'type': 'phone',
820
1238
  },
821
1239
  {
822
- 'order': 24,
1240
+ 'order': 39,
823
1241
  'show-by-default': true,
824
1242
  'title': 'Samsung Galaxy S20 Ultra',
825
1243
  'screen': {
@@ -841,7 +1259,7 @@ const emulatedDevices = [
841
1259
  'type': 'phone',
842
1260
  },
843
1261
  {
844
- 'order': 26,
1262
+ 'order': 40,
845
1263
  'show-by-default': true,
846
1264
  'title': 'iPad Mini',
847
1265
  'screen': {
@@ -863,7 +1281,7 @@ const emulatedDevices = [
863
1281
  'type': 'tablet',
864
1282
  },
865
1283
  {
866
- 'order': 28,
1284
+ 'order': 41,
867
1285
  'show-by-default': true,
868
1286
  'title': 'iPad Air',
869
1287
  'screen': {
@@ -885,7 +1303,7 @@ const emulatedDevices = [
885
1303
  'type': 'tablet',
886
1304
  },
887
1305
  {
888
- 'order': 29,
1306
+ 'order': 42,
889
1307
  'show-by-default': true,
890
1308
  'title': 'iPad Pro',
891
1309
  'screen': {
@@ -907,7 +1325,7 @@ const emulatedDevices = [
907
1325
  'type': 'tablet',
908
1326
  },
909
1327
  {
910
- 'order': 30,
1328
+ 'order': 43,
911
1329
  'show-by-default': true,
912
1330
  'title': 'Surface Pro 7',
913
1331
  'screen': {
@@ -927,7 +1345,7 @@ const emulatedDevices = [
927
1345
  'type': 'tablet',
928
1346
  },
929
1347
  {
930
- 'order': 32,
1348
+ 'order': 44,
931
1349
  'show-by-default': true,
932
1350
  'dual-screen': true,
933
1351
  'title': 'Surface Duo',
@@ -964,7 +1382,7 @@ const emulatedDevices = [
964
1382
  ],
965
1383
  },
966
1384
  {
967
- 'order': 34,
1385
+ 'order': 46,
968
1386
  'show-by-default': true,
969
1387
  'foldable-screen': true,
970
1388
  'title': 'Galaxy Z Fold 5',
@@ -1015,7 +1433,7 @@ const emulatedDevices = [
1015
1433
  ],
1016
1434
  },
1017
1435
  {
1018
- 'order': 35,
1436
+ 'order': 47,
1019
1437
  'show-by-default': true,
1020
1438
  'foldable-screen': true,
1021
1439
  'title': 'Asus Zenbook Fold',
@@ -1070,7 +1488,7 @@ const emulatedDevices = [
1070
1488
  ],
1071
1489
  },
1072
1490
  {
1073
- 'order': 36,
1491
+ 'order': 48,
1074
1492
  'show-by-default': true,
1075
1493
  'title': 'Samsung Galaxy A51/71',
1076
1494
  'screen': {
@@ -213,6 +213,14 @@ export function handleEvent(event: Types.Events.Event): void {
213
213
 
214
214
  export async function finalize(): Promise<void> {
215
215
  const {rendererProcessesByFrame} = metaHandlerData();
216
+
217
+ const allowedProtocols = [
218
+ 'blob:',
219
+ 'file:',
220
+ 'filesystem:',
221
+ 'http:',
222
+ 'https:',
223
+ ];
216
224
  for (const [requestId, request] of requestMap.entries()) {
217
225
  // If we have an incomplete set of events here, we choose to drop the network
218
226
  // request rather than attempt to synthesize the missing data.
@@ -248,7 +256,7 @@ export async function finalize(): Promise<void> {
248
256
  }
249
257
 
250
258
  redirects.push({
251
- url: sendRequest.args.data.url,
259
+ url: allowedProtocols.some(p => sendRequest.args.data.url.startsWith(p)) ? sendRequest.args.data.url : '',
252
260
  priority: sendRequest.args.data.priority,
253
261
  requestMethod: sendRequest.args.data.requestMethod,
254
262
  ts,
@@ -360,15 +368,7 @@ export async function finalize(): Promise<void> {
360
368
  }
361
369
  }
362
370
 
363
- // TODO: consider allowing chrome / about.
364
- const allowedProtocols = [
365
- 'blob:',
366
- 'file:',
367
- 'filesystem:',
368
- 'http:',
369
- 'https:',
370
- ];
371
- if (!allowedProtocols.some(p => firstSendRequest.args.data.url.startsWith(p))) {
371
+ if (!allowedProtocols.some(p => finalSendRequest.args.data.url.startsWith(p))) {
372
372
  continue;
373
373
  }
374
374
 
@@ -572,7 +572,11 @@ export async function finalize(): Promise<void> {
572
572
  responseHeaders: request.receiveResponse?.args.data.headers ?? null,
573
573
  fetchPriorityHint: finalSendRequest.args.data.fetchPriorityHint ?? 'auto',
574
574
  initiator: finalSendRequest.args.data.initiator,
575
- stackTrace: finalSendRequest.args.data.stackTrace,
575
+ stackTrace: finalSendRequest.args.data.stackTrace?.map(
576
+ frame => ({
577
+ ...frame,
578
+ url: allowedProtocols.some(p => frame.url.startsWith(p)) ? frame.url : '',
579
+ })),
576
580
  timing,
577
581
  lrServerResponseTime,
578
582
  url,
@@ -9,7 +9,7 @@ import * as SDK from '../../core/sdk/sdk.js';
9
9
  import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
10
10
  import type * as Protocol from '../../generated/protocol.js';
11
11
  import * as Bindings from '../bindings/bindings.js';
12
- import * as StackTrace from '../stack_trace/stack_trace.js';
12
+ import type * as StackTrace from '../stack_trace/stack_trace.js';
13
13
 
14
14
  export const enum Events {
15
15
  TOOLS_ADDED = 'ToolsAdded',
@@ -18,20 +18,13 @@ export const enum Events {
18
18
  TOOL_RESPONDED = 'ToolResponded',
19
19
  }
20
20
 
21
- export interface ExceptionDetails {
22
- readonly error: SDK.RemoteObject.RemoteObject;
23
- readonly description: string;
24
- readonly frames: StackTrace.ErrorStackParser.ParsedErrorFrame[];
25
- readonly cause?: ExceptionDetails;
26
- }
27
-
28
21
  export class Result {
29
22
  readonly status: Protocol.WebMCP.InvocationStatus;
30
23
  readonly output?: unknown;
31
24
  readonly errorText?: string;
32
25
  // TODO(crbug.com/494516094) Clean this up if the target disappears?
33
26
  readonly #exception?: SDK.RemoteObject.RemoteObject;
34
- #exceptionDetails?: Promise<ExceptionDetails|undefined>;
27
+ #symbolizedError?: Promise<Bindings.SymbolizedError.SymbolizedError|null>;
35
28
 
36
29
  constructor(
37
30
  status: Protocol.WebMCP.InvocationStatus, output: unknown|undefined, errorText: string|undefined,
@@ -42,46 +35,13 @@ export class Result {
42
35
  this.output = output;
43
36
  }
44
37
 
45
- get exceptionDetails(): Promise<ExceptionDetails|undefined>|undefined {
46
- if (!this.#exceptionDetails) {
47
- this.#exceptionDetails = this.#resolveExceptionDetails(this.#exception);
48
- }
49
- return this.#exceptionDetails;
50
- }
51
-
52
- async #resolveExceptionDetails(errorObj: SDK.RemoteObject.RemoteObject|undefined):
53
- Promise<ExceptionDetails|undefined> {
54
- if (!errorObj) {
55
- return undefined;
56
- }
57
- const error = SDK.RemoteObject.RemoteError.objectAsError(errorObj);
58
- const [details, cause] = await Promise.all([error.exceptionDetails(), error.cause()]);
59
- const description = error.errorStack;
60
-
61
- const frames =
62
- StackTrace.ErrorStackParser.parseSourcePositionsFromErrorStack(errorObj.runtimeModel(), error.errorStack) || [];
63
- if (details?.stackTrace) {
64
- StackTrace.ErrorStackParser.augmentErrorStackWithScriptIds(frames, details.stackTrace);
38
+ get symbolizedError(): Promise<Bindings.SymbolizedError.SymbolizedError|null>|undefined {
39
+ if (!this.#symbolizedError) {
40
+ this.#symbolizedError = this.#exception ?
41
+ Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createSymbolizedError(this.#exception) :
42
+ Promise.resolve(null);
65
43
  }
66
-
67
- if (cause?.subtype === 'error') {
68
- return {error: errorObj, description, frames, cause: await this.#resolveExceptionDetails(cause)};
69
- }
70
-
71
- if (cause?.type === 'string') {
72
- return {
73
- error: errorObj,
74
- description,
75
- frames,
76
- cause: {
77
- error: cause,
78
- description: cause.value as string,
79
- frames: [],
80
- }
81
- };
82
- }
83
-
84
- return {error: errorObj, description, frames};
44
+ return this.#symbolizedError;
85
45
  }
86
46
  }
87
47