@sourcegraph/cody-web 0.7.1 → 0.7.4

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.
@@ -1,6 +1,6 @@
1
1
  import type { ServerInfo } from 'cody-ai/src/jsonrpc/agent-protocol';
2
2
  import { type MessageConnection } from 'vscode-jsonrpc/browser';
3
- export interface AgentClient {
3
+ interface AgentClient {
4
4
  serverInfo: ServerInfo;
5
5
  rpc: MessageConnection;
6
6
  dispose(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.client.d.ts","sourceRoot":"","sources":["../../../lib/agent/agent.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAChF,OAAO,EAGH,KAAK,iBAAiB,EAGzB,MAAM,wBAAwB,CAAA;AAG/B,MAAM,WAAW,WAAW;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,iBAAiB,CAAA;IACtB,OAAO,IAAI,IAAI,CAAA;CAClB;AAED,UAAU,kBAAkB;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,MAAM,CAAA;IAC/B,gBAAgB,EAAE,MAAM,CAAA;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAsB,iBAAiB,CAAC,EACpC,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,KAAY,EACZ,KAAa,GAChB,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CA+D3C"}
1
+ {"version":3,"file":"agent.client.d.ts","sourceRoot":"","sources":["../../../lib/agent/agent.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAChF,OAAO,EAGH,KAAK,iBAAiB,EAGzB,MAAM,wBAAwB,CAAA;AAG/B,UAAU,WAAW;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,iBAAiB,CAAA;IACtB,OAAO,IAAI,IAAI,CAAA;CAClB;AAED,UAAU,kBAAkB;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,MAAM,CAAA;IAC/B,gBAAgB,EAAE,MAAM,CAAA;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAsB,iBAAiB,CAAC,EACpC,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,KAAY,EACZ,KAAa,GAChB,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CA+D3C"}
@@ -1,7 +1,7 @@
1
1
  import { type VSCodeWrapper } from 'cody-ai/webviews/utils/VSCodeApi';
2
2
  import type { MessageConnection } from 'vscode-jsonrpc/browser';
3
3
  import type { InitialContext } from '../types';
4
- export interface AgentClient {
4
+ interface AgentClient {
5
5
  rpc: MessageConnection;
6
6
  dispose(): void;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use-cody-agent.d.ts","sourceRoot":"","sources":["../../../lib/components/use-cody-agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,kCAAkC,CAAA;AAUvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG/D,OAAO,KAAK,EAAE,cAA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A;CACzC;AAED,UAAU,qBAAqB;IAC3B,MAAM,EAAE,WAAW,GAAG,KAAK,GAAG,IAAI,CAAA;IAClC,SAAS,EAAE,aAAa,GAAG,IAAI,CAAA;CAClC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,qBAAqB,CA2DlF"}
@@ -1,5 +1,5 @@
1
- import { u as util, e as exec, o as os, a as env, w as window, p as path, b as workspace, U as Uri, l as logError } from "./agent.worker-B1CAn5Kx.mjs";
2
- import { w as wrapInActiveSpan, T as TokenCounterUtils, C as ContextItemSource } from "./browser-DJC99jis.mjs";
1
+ import { u as util, e as exec, o as os, a as env, w as window, p as path, b as workspace, U as Uri, l as logError } from "./agent.worker-CiIPD-tv.mjs";
2
+ import { w as wrapInActiveSpan, T as TokenCounterUtils, C as ContextItemSource } from "./browser-BTzYzFoB.mjs";
3
3
  var define_process_default = { env: {} };
4
4
  const _exec = util.promisify(exec);
5
5
  async function getContextFileFromShell(command) {
package/dist/style.css CHANGED
@@ -205,23 +205,22 @@ html[data-ide=JetBrains] ._template-input-node_14yoh_1 {
205
205
  color: var(--vscode-input-foreground);
206
206
  opacity: 0.5;
207
207
  }
208
- ._outer-container_xb9w0_1 {
208
+ ._outer-container_hbzxh_1 {
209
209
  background-color: var(--vscode-sideBar-background);
210
210
  display: flex;
211
211
  flex-direction: column;
212
212
  box-sizing: border-box;
213
213
  height: 100%;
214
214
  overflow: hidden;
215
- isolation: isolate;
216
215
  }
217
216
 
218
- ._error-container_xb9w0_11 {
217
+ ._error-container_hbzxh_10 {
219
218
  display: flex;
220
219
  flex-direction: column-reverse;
221
220
  gap: 0.5rem;
222
221
  }
223
222
 
224
- ._error_xb9w0_11 {
223
+ ._error_hbzxh_10 {
225
224
  flex-direction: row;
226
225
  display: flex;
227
226
  padding: 1rem;
@@ -233,7 +232,7 @@ html[data-ide=JetBrains] ._template-input-node_14yoh_1 {
233
232
  align-items: baseline;
234
233
  }
235
234
 
236
- ._close-btn_xb9w0_29 {
235
+ ._close-btn_hbzxh_28 {
237
236
  position: absolute;
238
237
  top: 0.65rem;
239
238
  right: 0.25rem;
@@ -791,25 +790,25 @@ body[data-vscode-theme-kind='vscode-high-contrast-light'] ._context-item-link_13
791
790
  min-height: 1lh;
792
791
  }
793
792
  :root {
794
- --toolbar-button-font-size: 11px;
793
+ --toolbar-button-font-size: 12px;
795
794
  }
796
795
 
797
- ._button_n6cvl_5, ._button_n6cvl_5 + aside {
796
+ ._button_rqosg_5, ._button_rqosg_5 + aside {
798
797
  /* Also style our popovers. */
799
798
  font-size: var(--toolbar-button-font-size);
800
799
  line-height: var(--toolbar-button-font-size);
801
800
  }
802
801
 
803
- ._button_n6cvl_5 {
802
+ ._button_rqosg_5 {
804
803
 
805
804
  user-select: none;
806
805
  }
807
806
 
808
- ._button_n6cvl_5:enabled {
807
+ ._button_rqosg_5:enabled {
809
808
  cursor: pointer;
810
809
  }
811
810
 
812
- ._button_n6cvl_5 {
811
+ ._button_rqosg_5 {
813
812
 
814
813
  border-radius: 3px;
815
814
  --padding-y: 2px;
@@ -824,45 +823,45 @@ body[data-vscode-theme-kind='vscode-high-contrast-light'] ._context-item-link_13
824
823
  flex-shrink: 0;
825
824
  }
826
825
 
827
- ._button_n6cvl_5 > svg {
826
+ ._button_rqosg_5 > svg {
828
827
  flex-shrink: 0;
829
828
  width: var(--icon-size);
830
829
  height: var(--icon-size);
831
830
  stroke-width: 1.5px;
832
831
  }
833
832
 
834
- ._button--icon-end-chevron_n6cvl_37 > svg:last-child {
833
+ ._button--icon-end-chevron_rqosg_37 > svg:last-child {
835
834
  margin-left: calc(-1*var(--gap));
836
835
  }
837
836
 
838
- ._button--primary_n6cvl_41 {
837
+ ._button--primary_rqosg_41 {
839
838
  color: var(--vscode-button-foreground);
840
839
  background-color: var(--vscode-button-background);
841
840
  }
842
841
 
843
- ._button--primary_n6cvl_41._button--no-icon-start_n6cvl_45 {
842
+ ._button--primary_rqosg_41._button--no-icon-start_rqosg_45 {
844
843
  padding-left: calc(2*var(--padding-x));
845
844
  }
846
845
 
847
- ._button--primary_n6cvl_41._button--no-icon-end_n6cvl_49 {
846
+ ._button--primary_rqosg_41._button--no-icon-end_rqosg_49 {
848
847
  padding-right: calc(2*var(--padding-x));
849
848
  }
850
849
 
851
- ._button--secondary_n6cvl_54 {
850
+ ._button--secondary_rqosg_54 {
852
851
  opacity: 0.6;
853
852
  color: var(--vscode-input-foreground);
854
853
  background-color: unset;
855
854
  }
856
855
 
857
- ._button--secondary_n6cvl_54:enabled:is(:hover, :focus-within) {
856
+ ._button--secondary_rqosg_54:enabled:is(:hover, :focus-within) {
858
857
  opacity: 1;
859
858
  }
860
859
 
861
- ._button_n6cvl_5:disabled {
860
+ ._button_rqosg_5:disabled {
862
861
  opacity: 0.5;
863
862
  }
864
863
 
865
- ._button_n6cvl_5:disabled._button--secondary_n6cvl_54 {
864
+ ._button_rqosg_5:disabled._button--secondary_rqosg_54 {
866
865
  opacity: 0.7;
867
866
  }
868
867
  ._model-title-with-icon_rn0uf_1 {
@@ -930,60 +929,152 @@ button > ._model-title-with-icon_rn0uf_1 ._badge_rn0uf_35 {
930
929
  border-bottom: solid 1px var(--vscode-inputValidation-errorBorder);
931
930
  color: var(--vscode-foreground);
932
931
  }
933
- ._tabs-container_zt8hy_1 {
934
- background-color: var(--vscode-sideBar-background);
935
- display: inline-flex;
932
+ :root {
933
+ --vscode-overlay-background: rgba(0, 0, 0, 0.5);
934
+ --vscode-modal-background: var(--vscode-sideBar-background);
935
+ }
936
+
937
+ /*
938
+ Root element which only exists to use container query
939
+ for changing header tabs layout.
940
+ */
941
+ ._tabs-root_1do08_10 {
942
+ container-type: inline-size;
943
+ container-name: tabs-container;
944
+
945
+ isolation: isolate;
946
+ z-index: 1;
947
+ }
948
+
949
+ ._tabs-container_1do08_18 {
950
+ display: flex;
936
951
  justify-content: space-between;
952
+ position: sticky;
953
+ padding: 0 8px;
954
+ border-bottom: 1px solid var(--vscode-dropdown-border);
955
+ background-color: var(--vscode-sideBar-background);
937
956
  }
938
957
 
939
- ._active-tab_zt8hy_7 {
940
- border-color: var(--vscode-button-background);
941
- color: var(--vscode-button-background);
942
- border-width: 1.25px;
958
+ ._tabs_1do08_10 {
959
+ display: flex;
960
+ flex-shrink: 0;
961
+ gap: 2px;
943
962
  }
944
963
 
945
- :root {
946
- --vscode-overlay-background: rgba(0, 0, 0, 0.5);
947
- --vscode-modal-background: var(--vscode-sideBar-background);
964
+ ._tabs_1do08_10 > * {
965
+ flex-shrink: 0;
966
+ }
967
+
968
+ ._sub-tabs_1do08_37 {
969
+ display: flex;
970
+ flex-shrink: 0;
971
+ gap: 8px;
972
+ }
973
+
974
+ ._sub-tabs_1do08_37 > * {
975
+ flex-shrink: 0;
976
+ }
977
+
978
+ ._tab-action-label_1do08_47 {
979
+ display: inline;
980
+ }
981
+
982
+ ._tooltip_1do08_51 {
983
+ /*
984
+ Hide tooltips by default, show them only for state when labels are hidden.
985
+ Important is needed to override standard tailwind styles in tooltip internals
986
+ */
987
+ display: none !important;
988
+ }
989
+
990
+ /*
991
+ By default if we have enough space we render tabs and its
992
+ sub action tabs in one row but if we don't have enough space
993
+ which currently is just static value we switch to two rows
994
+ layout (one for tab and one below for sub-actions)
995
+ */
996
+ @container tabs-container (width < 750px) {
997
+ ._tabs-container_1do08_18 {
998
+ padding: 0;
999
+ flex-direction: column;
1000
+ }
1001
+
1002
+ ._tabs_1do08_10 {
1003
+ padding: 0 8px;
1004
+ border-bottom: 1px solid var(--vscode-dropdown-border);
1005
+ }
1006
+
1007
+ ._sub-tabs_1do08_37 {
1008
+ padding: 0 8px;
1009
+ }
948
1010
  }
949
1011
 
950
- ._dialog-overlay_zt8hy_1 {
1012
+ /*
1013
+ For small container turn off tabs labels completely and go back
1014
+ to one row layout for tabs and its sub actions
1015
+ */
1016
+ @container tabs-container (width < 475px) {
1017
+ ._tab-action-label_1do08_47 {
1018
+ display: none;
1019
+ }
1020
+
1021
+ ._tabs-container_1do08_18 {
1022
+ padding: 0 8px;
1023
+ flex-direction: row;
1024
+ }
1025
+
1026
+ ._tabs_1do08_10 {
1027
+ padding: 0;
1028
+ border-bottom: none;
1029
+ }
1030
+
1031
+ ._sub-tabs_1do08_37 {
1032
+ padding: 0;
1033
+ }
1034
+
1035
+ ._tooltip_1do08_51 {
1036
+ display: block !important;
1037
+ }
1038
+ }
1039
+
1040
+ ._dialog-overlay_1do08_1 {
951
1041
  inset: 0;
952
1042
  position: fixed;
953
1043
  background-color: var(--vscode-overlay-background);
954
1044
  }
955
1045
 
956
- ._dialog-content_zt8hy_1 {
957
- background-color: var(--vscode-modal-background);
958
- border-radius: 6px;
959
- box-shadow: hsl(206 22% 7% / 35%) 0 10px 38px -10px, hsl(206 22% 7% / 20%) 0 10px 20px -15px;
1046
+ ._dialog-content_1do08_1 {
1047
+ width: 90vw;
1048
+ max-width: 450px;
1049
+ max-height: 85vh;
960
1050
  position: fixed;
961
1051
  top: 50%;
962
1052
  left: 50%;
963
1053
  transform: translate(-50%, -50%);
964
- width: 90vw;
965
- max-width: 450px;
966
- max-height: 85vh;
967
1054
  padding: 25px;
1055
+
1056
+ border-radius: 6px;
1057
+ background-color: var(--vscode-modal-background);
1058
+ box-shadow: hsl(206 22% 7% / 35%) 0 10px 38px -10px, hsl(206 22% 7% / 20%) 0 10px 20px -15px;
968
1059
  }
969
1060
 
970
- ._dialog-content_zt8hy_1:focus {
1061
+ ._dialog-content_1do08_1:focus {
971
1062
  outline: none;
972
1063
  }
973
1064
 
974
- ._dialog-title_zt8hy_1 {
1065
+ ._dialog-title_1do08_1 {
975
1066
  margin: 0;
976
1067
  font-weight: 500;
977
1068
  font-size: 17px;
978
1069
  }
979
1070
 
980
- ._dialog-description_zt8hy_1 {
1071
+ ._dialog-description_1do08_1 {
981
1072
  margin: 10px 0 20px;
982
1073
  font-size: 15px;
983
1074
  line-height: 1.5;
984
1075
  }
985
1076
 
986
- ._dialog-footer_zt8hy_1 {
1077
+ ._dialog-footer_1do08_1 {
987
1078
  margin-top: 1.5rem;
988
1079
  width: 100%;
989
1080
  display: flex;
@@ -2309,9 +2400,6 @@ imported in Sourcegraph shell.
2309
2400
  .tw-left-\[5\.5px\] {
2310
2401
  left: 5.5px;
2311
2402
  }
2312
- .tw-top-0 {
2313
- top: 0px;
2314
- }
2315
2403
  .tw-top-\[0px\] {
2316
2404
  top: 0px;
2317
2405
  }
@@ -2338,9 +2426,15 @@ imported in Sourcegraph shell.
2338
2426
  .tw-mb-4 {
2339
2427
  margin-bottom: 8px;
2340
2428
  }
2429
+ .tw-mb-5 {
2430
+ margin-bottom: 10px;
2431
+ }
2341
2432
  .tw-mb-6 {
2342
2433
  margin-bottom: 12px;
2343
2434
  }
2435
+ .tw-mb-8 {
2436
+ margin-bottom: 16px;
2437
+ }
2344
2438
  .tw-ml-1 {
2345
2439
  margin-left: 2px;
2346
2440
  }
@@ -2374,9 +2468,15 @@ imported in Sourcegraph shell.
2374
2468
  .tw-mt-4 {
2375
2469
  margin-top: 8px;
2376
2470
  }
2471
+ .tw-mt-6 {
2472
+ margin-top: 12px;
2473
+ }
2377
2474
  .tw-mt-\[-1px\] {
2378
2475
  margin-top: -1px;
2379
2476
  }
2477
+ .tw-mt-auto {
2478
+ margin-top: auto;
2479
+ }
2380
2480
  .tw-flex {
2381
2481
  display: flex;
2382
2482
  }
@@ -2386,9 +2486,6 @@ imported in Sourcegraph shell.
2386
2486
  .tw-grid {
2387
2487
  display: grid;
2388
2488
  }
2389
- .tw-hidden {
2390
- display: none;
2391
- }
2392
2489
  .\!tw-h-\[30px\] {
2393
2490
  height: 30px !important;
2394
2491
  }
@@ -2556,6 +2653,9 @@ imported in Sourcegraph shell.
2556
2653
  .tw-items-stretch {
2557
2654
  align-items: stretch;
2558
2655
  }
2656
+ .tw-justify-end {
2657
+ justify-content: flex-end;
2658
+ }
2559
2659
  .tw-justify-center {
2560
2660
  justify-content: center;
2561
2661
  }
@@ -2662,8 +2762,8 @@ imported in Sourcegraph shell.
2662
2762
  .tw-rounded-\[0\.5px\] {
2663
2763
  border-radius: 0.5px;
2664
2764
  }
2665
- .tw-rounded-\[2px\] {
2666
- border-radius: 2px;
2765
+ .tw-rounded-\[6px\] {
2766
+ border-radius: 6px;
2667
2767
  }
2668
2768
  .tw-rounded-full {
2669
2769
  border-radius: 9999px;
@@ -2861,9 +2961,6 @@ imported in Sourcegraph shell.
2861
2961
  .tw-pl-5 {
2862
2962
  padding-left: 10px;
2863
2963
  }
2864
- .tw-pl-\[15px\] {
2865
- padding-left: 15px;
2866
- }
2867
2964
  .tw-pr-4 {
2868
2965
  padding-right: 8px;
2869
2966
  }
@@ -3542,14 +3639,6 @@ body[data-vscode-theme-kind="vscode-high-contrast"] .high-contrast-dark\:tw-bord
3542
3639
  body[data-vscode-theme-kind="vscode-high-contrast"] .high-contrast-dark\:tw-border-e-transparent {
3543
3640
  border-inline-end-color: transparent;
3544
3641
  }
3545
- @media (min-width: 768px) {
3546
- .md\:tw-inline {
3547
- display: inline;
3548
- }
3549
- .md\:tw-hidden {
3550
- display: none;
3551
- }
3552
- }
3553
3642
  .\[\&\:not\(\:last-child\)\]\:tw-border-b:not(:last-child) {
3554
3643
  border-bottom-width: 1px;
3555
3644
  }