Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Improve icon selection for edit prediction providers (#47911)

versecafe9c3ae09896a2
diff --git a/Cargo.lock b/Cargo.lock
index e969208a047..142ec58ed40 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3302,6 +3302,7 @@ dependencies = [
"futures 0.3.31",
"gpui",
"http_client",
+ "icons",
"language",
"language_models",
"log",
@@ -3734,6 +3735,7 @@ dependencies = [
"futures 0.3.31",
"gpui",
"http_client",
+ "icons",
"indoc",
"language",
"log",
@@ -5444,6 +5446,7 @@ version = "0.1.0"
dependencies = [
"client",
"gpui",
+ "icons",
"language",
"text",
]
diff --git a/assets/icons/sweep_ai.svg b/assets/icons/sweep_ai.svg
index bf3459c7ea9..9c63c810dd9 100644
--- a/assets/icons/sweep_ai.svg
+++ b/assets/icons/sweep_ai.svg
@@ -1,32 +1 @@
-<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g clip-path="url(#clip0_3348_16)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M7.97419 6.27207C8.44653 6.29114 8.86622 6.27046 9.23628 6.22425C9.08884 7.48378 8.7346 8.72903 8.16697 9.90688C8.04459 9.83861 7.92582 9.76008 7.81193 9.67108C7.64539 9.54099 7.49799 9.39549 7.37015 9.23818C7.5282 9.54496 7.64901 9.86752 7.73175 10.1986C7.35693 10.6656 6.90663 11.0373 6.412 11.3101C5.01165 10.8075 4.03638 9.63089 4.03638 7.93001C4.03638 6.96185 4.35234 6.07053 4.88281 5.36157C5.34001 5.69449 6.30374 6.20455 7.97419 6.27207ZM8.27511 11.5815C10.3762 11.5349 11.8115 10.7826 12.8347 7.93001C11.6992 7.93001 11.4246 7.10731 11.1188 6.19149C11.0669 6.03596 11.0141 5.87771 10.956 5.72037C10.6733 5.86733 10.2753 6.02782 9.74834 6.13895C9.59658 7.49345 9.20592 8.83238 8.56821 10.0897C8.89933 10.2093 9.24674 10.262 9.5908 10.2502C9.08928 10.4803 8.62468 10.8066 8.22655 11.2255C8.2457 11.3438 8.26186 11.4625 8.27511 11.5815ZM6.62702 7.75422C6.62702 7.50604 6.82821 7.30485 7.07639 7.30485C7.32457 7.30485 7.52576 7.50604 7.52576 7.75422V8.23616C7.52576 8.48435 7.32457 8.68554 7.07639 8.68554C6.82821 8.68554 6.62702 8.48435 6.62702 8.23616V7.75422ZM5.27746 7.30485C5.05086 7.30485 4.86716 7.48854 4.86716 7.71513V8.27525C4.86716 8.50185 5.05086 8.68554 5.27746 8.68554C5.50406 8.68554 5.68776 8.50185 5.68776 8.27525V7.71513C5.68776 7.48854 5.50406 7.30485 5.27746 7.30485Z" fill="white"/>
-<mask id="mask0_3348_16" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="4" y="5" width="9" height="7">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M7.97419 6.27207C8.44653 6.29114 8.86622 6.27046 9.23628 6.22425C9.08884 7.48378 8.7346 8.72903 8.16697 9.90688C8.04459 9.83861 7.92582 9.76008 7.81193 9.67108C7.64539 9.54099 7.49799 9.39549 7.37015 9.23818C7.5282 9.54496 7.64901 9.86752 7.73175 10.1986C7.35693 10.6656 6.90663 11.0373 6.412 11.3101C5.01165 10.8075 4.03638 9.63089 4.03638 7.93001C4.03638 6.96185 4.35234 6.07053 4.88281 5.36157C5.34001 5.69449 6.30374 6.20455 7.97419 6.27207ZM8.27511 11.5815C10.3762 11.5349 11.8115 10.7826 12.8347 7.93001C11.6992 7.93001 11.4246 7.10731 11.1188 6.19149C11.0669 6.03596 11.0141 5.87771 10.956 5.72037C10.6733 5.86733 10.2753 6.02782 9.74834 6.13895C9.59658 7.49345 9.20592 8.83238 8.56821 10.0897C8.89933 10.2093 9.24674 10.262 9.5908 10.2502C9.08928 10.4803 8.62468 10.8066 8.22655 11.2255C8.2457 11.3438 8.26186 11.4625 8.27511 11.5815ZM6.62702 7.75422C6.62702 7.50604 6.82821 7.30485 7.07639 7.30485C7.32457 7.30485 7.52576 7.50604 7.52576 7.75422V8.23616C7.52576 8.48435 7.32457 8.68554 7.07639 8.68554C6.82821 8.68554 6.62702 8.48435 6.62702 8.23616V7.75422ZM5.27746 7.30485C5.05086 7.30485 4.86716 7.48854 4.86716 7.71513V8.27525C4.86716 8.50185 5.05086 8.68554 5.27746 8.68554C5.50406 8.68554 5.68776 8.50185 5.68776 8.27525V7.71513C5.68776 7.48854 5.50406 7.30485 5.27746 7.30485Z" fill="white"/>
-</mask>
-<g mask="url(#mask0_3348_16)">
-<path d="M9.23617 6.22425L9.39588 6.24293L9.41971 6.0393L9.21624 6.06471L9.23617 6.22425ZM8.16687 9.90688L8.08857 10.0473L8.23765 10.1305L8.31174 9.97669L8.16687 9.90688ZM7.37005 9.23819L7.49487 9.13676L7.22714 9.3118L7.37005 9.23819ZM7.73165 10.1986L7.85702 10.2993L7.90696 10.2371L7.88761 10.1597L7.73165 10.1986ZM6.41189 11.3101L6.35758 11.4615L6.42594 11.486L6.48954 11.4509L6.41189 11.3101ZM4.88271 5.36157L4.97736 5.23159L4.84905 5.13817L4.75397 5.26525L4.88271 5.36157ZM8.27501 11.5815L8.11523 11.5993L8.13151 11.7456L8.27859 11.7423L8.27501 11.5815ZM12.8346 7.93001L12.986 7.98428L13.0631 7.76921H12.8346V7.93001ZM10.9559 5.72037L11.1067 5.66469L11.0436 5.49354L10.8817 5.5777L10.9559 5.72037ZM9.74824 6.13896L9.71508 5.98161L9.60139 6.0056L9.58846 6.12102L9.74824 6.13896ZM8.56811 10.0897L8.42469 10.017L8.34242 10.1792L8.51348 10.241L8.56811 10.0897ZM9.5907 10.2502L9.65775 10.3964L9.58519 10.0896L9.5907 10.2502ZM8.22644 11.2255L8.10992 11.1147L8.05502 11.1725L8.06773 11.2512L8.22644 11.2255ZM9.21624 6.06471C8.85519 6.10978 8.44439 6.13015 7.98058 6.11139L7.96756 6.43272C8.44852 6.45215 8.87701 6.43111 9.25607 6.3838L9.21624 6.06471ZM8.31174 9.97669C8.88724 8.78244 9.2464 7.51988 9.39588 6.24293L9.07647 6.20557C8.93108 7.44772 8.58175 8.67563 8.02203 9.83708L8.31174 9.97669ZM8.2452 9.76645C8.12998 9.70219 8.01817 9.62826 7.91082 9.54438L7.71285 9.79779C7.8333 9.8919 7.95895 9.97503 8.08857 10.0473L8.2452 9.76645ZM7.91082 9.54438C7.75387 9.4218 7.61512 9.28479 7.49487 9.13676L7.24526 9.33957C7.38066 9.50619 7.53671 9.66023 7.71285 9.79779L7.91082 9.54438ZM7.22714 9.3118C7.37944 9.60746 7.49589 9.91837 7.57564 10.2376L7.88761 10.1597C7.80196 9.81663 7.67679 9.48248 7.513 9.16453L7.22714 9.3118ZM7.60624 10.098C7.24483 10.5482 6.81083 10.9065 6.33425 11.1693L6.48954 11.4509C7.00223 11.1682 7.46887 10.7829 7.85702 10.2993L7.60624 10.098ZM3.87549 7.93001C3.87548 9.7042 4.89861 10.9378 6.35758 11.4615L6.46622 11.1588C5.12449 10.6772 4.19707 9.55763 4.19707 7.93001H3.87549ZM4.75397 5.26525C4.20309 6.00147 3.87549 6.92646 3.87549 7.93001H4.19707C4.19707 6.99724 4.50139 6.13959 5.01145 5.45791L4.75397 5.26525ZM7.98058 6.11139C6.34236 6.04516 5.40922 5.54604 4.97736 5.23159L4.78806 5.49157C5.27058 5.84291 6.26491 6.3639 7.96756 6.43272L7.98058 6.11139ZM8.27859 11.7423C9.34696 11.7185 10.2682 11.515 11.0542 10.9376C11.8388 10.3612 12.4683 9.4273 12.986 7.98428L12.6833 7.8757C12.1776 9.28534 11.5779 10.1539 10.8638 10.6784C10.1511 11.202 9.30417 11.3978 8.27143 11.4208L8.27859 11.7423ZM12.8346 7.76921C12.3148 7.76921 12.0098 7.58516 11.7925 7.30552C11.5639 7.0114 11.4266 6.60587 11.2712 6.14061L10.9662 6.24242C11.1166 6.69294 11.2695 7.15667 11.5385 7.50285C11.8188 7.86347 12.2189 8.09078 12.8346 8.09078V7.76921ZM11.2712 6.14061C11.2195 5.98543 11.1658 5.82478 11.1067 5.66469L10.805 5.77606C10.8621 5.93065 10.9142 6.0865 10.9662 6.24242L11.2712 6.14061ZM10.8817 5.5777C10.6115 5.71821 10.2273 5.87362 9.71508 5.98161L9.78143 6.29626C10.3232 6.18206 10.735 6.0165 11.0301 5.86301L10.8817 5.5777ZM9.58846 6.12102C9.43882 7.45684 9.05355 8.77717 8.42469 10.017L8.71149 10.1625C9.35809 8.88764 9.75417 7.53011 9.90806 6.15685L9.58846 6.12102ZM9.58519 10.0896C9.26119 10.1006 8.93423 10.051 8.62269 9.93854L8.51348 10.241C8.86427 10.3677 9.23205 10.4234 9.5962 10.4109L9.58519 10.0896ZM8.34301 11.3363C8.72675 10.9325 9.17443 10.6181 9.65775 10.3964L9.52365 10.1041C9.00392 10.3425 8.52241 10.6807 8.10992 11.1147L8.34301 11.3363ZM8.43483 11.5638C8.4213 11.4421 8.40475 11.3207 8.3852 11.1998L8.06773 11.2512C8.08644 11.3668 8.10225 11.4829 8.11523 11.5993L8.43483 11.5638ZM7.07629 7.14405C6.73931 7.14405 6.46613 7.41724 6.46613 7.75423H6.7877C6.7877 7.59484 6.91691 7.46561 7.07629 7.46561V7.14405ZM7.68646 7.75423C7.68646 7.41724 7.41326 7.14405 7.07629 7.14405V7.46561C7.23567 7.46561 7.36489 7.59484 7.36489 7.75423H7.68646ZM7.68646 8.23616V7.75423H7.36489V8.23616H7.68646ZM7.07629 8.84634C7.41326 8.84634 7.68646 8.57315 7.68646 8.23616H7.36489C7.36489 8.39555 7.23567 8.52474 7.07629 8.52474V8.84634ZM6.46613 8.23616C6.46613 8.57315 6.73931 8.84634 7.07629 8.84634V8.52474C6.91691 8.52474 6.7877 8.39555 6.7877 8.23616H6.46613ZM6.46613 7.75423V8.23616H6.7877V7.75423H6.46613ZM5.02785 7.71514C5.02785 7.57734 5.13956 7.46561 5.27736 7.46561V7.14405C4.96196 7.14405 4.70627 7.39974 4.70627 7.71514H5.02785ZM5.02785 8.27525V7.71514H4.70627V8.27525H5.02785ZM5.27736 8.52474C5.13956 8.52474 5.02785 8.41305 5.02785 8.27525H4.70627C4.70627 8.59065 4.96196 8.84634 5.27736 8.84634V8.52474ZM5.52687 8.27525C5.52687 8.41305 5.41516 8.52474 5.27736 8.52474V8.84634C5.59277 8.84634 5.84845 8.59065 5.84845 8.27525H5.52687ZM5.52687 7.71514V8.27525H5.84845V7.71514H5.52687ZM5.27736 7.46561C5.41516 7.46561 5.52687 7.57734 5.52687 7.71514H5.84845C5.84845 7.39974 5.59277 7.14405 5.27736 7.14405V7.46561Z" fill="white"/>
-</g>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M7.12635 14.5901C7.22369 14.3749 7.3069 14.1501 7.37454 13.9167C7.54132 13.3412 7.5998 12.7599 7.56197 12.1948C7.53665 12.5349 7.47589 12.8775 7.37718 13.2181C7.23926 13.694 7.03667 14.1336 6.78174 14.5301C6.89605 14.5547 7.01101 14.5747 7.12635 14.5901Z" fill="white"/>
-<path d="M9.71984 7.74796C9.50296 7.74796 9.29496 7.83412 9.14159 7.98745C8.98822 8.14082 8.9021 8.34882 8.9021 8.5657C8.9021 8.78258 8.98822 8.99057 9.14159 9.14394C9.29496 9.29728 9.50296 9.38344 9.71984 9.38344V8.5657V7.74796Z" fill="white"/>
-<mask id="mask1_3348_16" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="5" y="2" width="8" height="9">
-<path d="M12.3783 2.9985H5.36792V10.3954H12.3783V2.9985Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M9.75733 3.61999C9.98577 5.80374 9.60089 8.05373 8.56819 10.0898C8.43122 10.0403 8.29704 9.9794 8.16699 9.90688C9.15325 7.86033 9.49538 5.61026 9.22757 3.43526C9.39923 3.51584 9.57682 3.57729 9.75733 3.61999Z" fill="black"/>
-</mask>
-<g mask="url(#mask1_3348_16)">
-<path d="M8.56815 10.0898L8.67689 10.1449L8.62812 10.241L8.52678 10.2044L8.56815 10.0898ZM9.75728 3.61998L9.78536 3.50136L9.86952 3.52127L9.87853 3.6073L9.75728 3.61998ZM8.16695 9.90687L8.1076 10.0133L8.00732 9.9574L8.05715 9.85398L8.16695 9.90687ZM9.22753 3.43524L9.10656 3.45014L9.07958 3.23116L9.27932 3.32491L9.22753 3.43524ZM8.45945 10.0346C9.48122 8.02009 9.86217 5.79374 9.63608 3.63266L9.87853 3.6073C10.1093 5.81372 9.72048 8.0873 8.67689 10.1449L8.45945 10.0346ZM8.22633 9.80041C8.35056 9.86971 8.47876 9.92791 8.60956 9.97514L8.52678 10.2044C8.38363 10.1527 8.24344 10.0891 8.1076 10.0133L8.22633 9.80041ZM9.34849 3.42035C9.61905 5.61792 9.27346 7.89158 8.27675 9.9598L8.05715 9.85398C9.03298 7.82905 9.37158 5.60258 9.10656 3.45014L9.34849 3.42035ZM9.72925 3.7386C9.54064 3.69399 9.3551 3.62977 9.17573 3.54558L9.27932 3.32491C9.44327 3.40188 9.61288 3.46058 9.78536 3.50136L9.72925 3.7386Z" fill="white"/>
-</g>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M11.4118 3.46925L11.2416 3.39926L11.1904 3.57611L11.349 3.62202C11.1904 3.57611 11.1904 3.57615 11.1904 3.5762L11.1903 3.57631L11.1902 3.57658L11.19 3.57741L11.1893 3.58009C11.1886 3.58233 11.1878 3.58548 11.1867 3.58949C11.1845 3.5975 11.1814 3.60897 11.1777 3.62359C11.1703 3.6528 11.1603 3.69464 11.1493 3.74656C11.1275 3.85017 11.102 3.99505 11.0869 4.16045C11.0573 4.4847 11.0653 4.91594 11.2489 5.26595C11.2613 5.28944 11.2643 5.31174 11.2625 5.32629C11.261 5.33849 11.2572 5.34226 11.2536 5.3449C11.0412 5.50026 10.5639 5.78997 9.76653 5.96607C9.76095 6.02373 9.75493 6.08134 9.74848 6.13895C10.601 5.95915 11.1161 5.65017 11.3511 5.4782C11.4413 5.41219 11.4471 5.28823 11.3952 5.18922C11.1546 4.73063 11.2477 4.08248 11.3103 3.78401C11.3314 3.68298 11.349 3.62202 11.349 3.62202C11.3745 3.6325 11.4002 3.63983 11.4259 3.64425C11.9083 3.72709 12.4185 2.78249 12.6294 2.33939C12.6852 2.22212 12.6234 2.08843 12.497 2.05837C11.2595 1.76399 5.46936 0.631807 4.57214 4.96989C4.55907 5.03307 4.57607 5.10106 4.62251 5.14584C4.87914 5.39322 5.86138 6.18665 7.9743 6.27207C8.44664 6.29114 8.86633 6.27046 9.23638 6.22425C9.24295 6.16797 9.24912 6.1117 9.25491 6.05534C8.88438 6.10391 8.46092 6.12641 7.98094 6.10702C5.91152 6.02337 4.96693 5.24843 4.73714 5.02692C4.73701 5.02679 4.73545 5.02525 4.73422 5.0208C4.73292 5.01611 4.73254 5.00987 4.73388 5.00334C4.94996 3.95861 5.4573 3.25195 6.11188 2.77714C6.77039 2.29947 7.58745 2.04983 8.42824 1.94075C10.1122 1.72228 11.8454 2.07312 12.4588 2.21906C12.4722 2.22225 12.4787 2.22927 12.4819 2.2362C12.4853 2.24342 12.4869 2.25443 12.4803 2.2684C12.3706 2.49879 12.183 2.85746 11.9656 3.13057C11.8564 3.26783 11.7479 3.37295 11.6469 3.43216C11.5491 3.48956 11.4752 3.49529 11.4118 3.46925Z" fill="white"/>
-<mask id="mask2_3348_16" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="3" y="9" width="7" height="6">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M8.22654 11.2255C8.62463 10.8066 9.08923 10.4803 9.59075 10.2502C8.97039 10.2715 8.33933 10.0831 7.81189 9.67109C7.64534 9.541 7.49795 9.39549 7.37014 9.23819C7.52815 9.54497 7.64896 9.86752 7.7317 10.1986C6.70151 11.4821 5.1007 12.0466 3.57739 11.8125C3.85909 12.527 4.32941 13.178 4.97849 13.6851C5.8625 14.3756 6.92544 14.6799 7.96392 14.6227C8.32513 13.5174 8.4085 12.351 8.22654 11.2255Z" fill="white"/>
-</mask>
-<g mask="url(#mask2_3348_16)">
-<path d="M9.59085 10.2502L9.58389 10.0472L9.67556 10.4349L9.59085 10.2502ZM8.22663 11.2255L8.02607 11.258L8.00999 11.1585L8.07936 11.0856L8.22663 11.2255ZM7.37024 9.23819L7.18961 9.33119L7.52789 9.11006L7.37024 9.23819ZM7.7318 10.1986L7.92886 10.1494L7.95328 10.2472L7.8902 10.3258L7.7318 10.1986ZM3.57749 11.8125L3.3885 11.887L3.25879 11.5579L3.60835 11.6117L3.57749 11.8125ZM7.96402 14.6227L8.15711 14.6858L8.11397 14.8179L7.97519 14.8255L7.96402 14.6227ZM9.67556 10.4349C9.19708 10.6544 8.7538 10.9657 8.37387 11.3655L8.07936 11.0856C8.49566 10.6475 8.98161 10.3062 9.50614 10.0656L9.67556 10.4349ZM7.93704 9.51099C8.42551 9.89261 9.00942 10.0669 9.58389 10.0472L9.59781 10.4533C8.93151 10.4761 8.25334 10.2737 7.68693 9.83118L7.93704 9.51099ZM7.52789 9.11006C7.64615 9.25565 7.78261 9.39038 7.93704 9.51099L7.68693 9.83118C7.50827 9.69161 7.34994 9.53537 7.21254 9.36627L7.52789 9.11006ZM7.5347 10.2479C7.45573 9.93178 7.34043 9.62393 7.18961 9.33119L7.55082 9.14514C7.71611 9.466 7.84242 9.80326 7.92886 10.1494L7.5347 10.2479ZM3.60835 11.6117C5.06278 11.8352 6.59038 11.2962 7.57335 10.0715L7.8902 10.3258C6.81284 11.6681 5.1388 12.258 3.54663 12.0133L3.60835 11.6117ZM4.85352 13.8452C4.17512 13.3152 3.68312 12.6343 3.3885 11.887L3.76648 11.738C4.03524 12.4197 4.4839 13.0409 5.10364 13.525L4.85352 13.8452ZM7.97519 14.8255C6.8895 14.8853 5.77774 14.5672 4.85352 13.8452L5.10364 13.525C5.94745 14.1842 6.96157 14.4744 7.95285 14.4198L7.97519 14.8255ZM8.42716 11.1931C8.61419 12.3499 8.52858 13.5491 8.15711 14.6858L7.77093 14.5596C8.12191 13.4857 8.20296 12.352 8.02607 11.258L8.42716 11.1931Z" fill="white"/>
-</g>
-</g>
-<defs>
-<clipPath id="clip0_3348_16">
-<rect width="9.63483" height="14" fill="white" transform="translate(3.19995 1.5)"/>
-</clipPath>
-</defs>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><mask id="a" width="10" height="14" x="3" y="1" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M12.635 1H3v14h9.635V1Z"/></mask><g mask="url(#a)"><path fill="#fff" fill-rule="evenodd" d="M7.774 5.773a7.68 7.68 0 0 0 1.262-.048 11.578 11.578 0 0 1-1.07 3.683 2.76 2.76 0 0 1-.796-.67c.158.308.279.63.361.961a4.438 4.438 0 0 1-1.32 1.112c-1.4-.503-2.375-1.68-2.375-3.38 0-.968.316-1.86.846-2.569.458.333 1.421.843 3.092.91Zm.3 5.31c2.102-.047 3.537-.8 4.56-3.652-1.135 0-1.41-.823-1.716-1.739-.051-.155-.104-.314-.162-.47-.283.146-.681.307-1.208.418a11.577 11.577 0 0 1-1.18 3.95c.33.12.678.173 1.022.16-.501.231-.966.557-1.364.976.02.118.035.237.049.356ZM6.428 7.254a.45.45 0 0 1 .898 0v.482a.45.45 0 1 1-.898 0v-.482Zm-1.35-.45a.41.41 0 0 0-.41.41v.561a.41.41 0 0 0 .82 0v-.56a.41.41 0 0 0-.41-.41Z" clip-rule="evenodd"/><mask id="b" width="10" height="8" x="3" y="4" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M7.774 5.773a7.68 7.68 0 0 0 1.262-.048 11.578 11.578 0 0 1-1.07 3.683 2.76 2.76 0 0 1-.796-.67c.158.308.279.63.361.961a4.438 4.438 0 0 1-1.32 1.112c-1.4-.503-2.375-1.68-2.375-3.38 0-.968.316-1.86.846-2.569.458.333 1.421.843 3.092.91Zm.3 5.31c2.102-.047 3.537-.8 4.56-3.652-1.135 0-1.41-.823-1.716-1.739-.051-.155-.104-.314-.162-.47-.283.146-.681.307-1.208.418a11.577 11.577 0 0 1-1.18 3.95c.33.12.678.173 1.022.16-.501.231-.966.557-1.364.976.02.118.035.237.049.356ZM6.428 7.254a.45.45 0 0 1 .898 0v.482a.45.45 0 1 1-.898 0v-.482Zm-1.35-.45a.41.41 0 0 0-.41.41v.561a.41.41 0 0 0 .82 0v-.56a.41.41 0 0 0-.41-.41Z" clip-rule="evenodd"/></mask><g mask="url(#b)"><path fill="#fff" d="m9.035 5.725.16.018.024-.203-.203.025.02.16ZM7.966 9.407l-.078.14.149.084.074-.154-.145-.07ZM7.17 8.74l.125-.102-.268.175.143-.073Zm.362.96.125.1.05-.061-.02-.078-.155.04Zm-1.32 1.112-.054.151.068.024.064-.035-.078-.14ZM4.682 4.862l.095-.13-.129-.093-.095.127.129.096Zm3.392 6.22-.16.018.017.146.147-.003-.004-.161Zm4.56-3.651.151.054.077-.215h-.228v.16Zm-1.879-2.21.151-.056-.063-.171-.162.084.074.143Zm-1.207.418-.034-.157-.113.024-.013.116.16.017ZM8.368 9.59l-.144-.072-.082.162.17.062.055-.152Zm1.022.16.067.147-.073-.307.006.16Zm-1.364.976-.117-.11-.055.057.013.079.159-.026Zm.99-5.16a7.517 7.517 0 0 1-1.236.046l-.013.321c.48.02.91-.001 1.288-.049l-.04-.319ZM8.11 9.476a11.74 11.74 0 0 0 1.084-3.734l-.32-.037a11.416 11.416 0 0 1-1.054 3.632l.29.14Zm-.066-.21a2.599 2.599 0 0 1-.335-.222l-.198.253c.12.094.246.178.376.25l.157-.281Zm-.335-.222a2.585 2.585 0 0 1-.416-.408l-.25.203c.136.167.292.32.468.458l.198-.253Zm-.684-.233c.153.296.27.607.349.926l.312-.078a4.613 4.613 0 0 0-.375-.995l-.286.147Zm.38.787c-.362.45-.796.808-1.272 1.07l.155.282c.513-.282.98-.668 1.367-1.151l-.25-.202ZM3.675 7.43c0 1.774 1.023 3.007 2.482 3.531l.109-.303c-1.342-.481-2.27-1.6-2.27-3.228h-.321Zm.878-2.665a4.436 4.436 0 0 0-.878 2.665h.321c0-.933.305-1.79.815-2.473l-.258-.192Zm3.227.846c-1.638-.066-2.571-.565-3.003-.88l-.19.26c.483.351 1.477.872 3.18.941l.013-.321Zm.298 5.63c1.068-.023 1.99-.227 2.776-.804.784-.576 1.414-1.51 1.931-2.953l-.302-.109c-.506 1.41-1.106 2.278-1.82 2.803-.713.524-1.56.72-2.592.742l.007.322Zm4.556-3.972c-.52 0-.825-.184-1.042-.464-.229-.294-.366-.7-.522-1.165l-.305.102c.15.45.304.914.573 1.26.28.361.68.588 1.296.588V7.27ZM11.07 5.64a15.68 15.68 0 0 0-.164-.476l-.302.112c.057.154.11.31.162.466l.304-.102Zm-.389-.563c-.27.14-.654.296-1.167.404l.067.315c.542-.114.953-.28 1.248-.433l-.148-.286Zm-1.293.544a11.415 11.415 0 0 1-1.164 3.896l.287.145a11.738 11.738 0 0 0 1.196-4.006l-.32-.035ZM9.384 9.59a2.577 2.577 0 0 1-.962-.151l-.11.303c.352.126.72.182 1.084.17l-.012-.322Zm-1.242 1.247a4.264 4.264 0 0 1 1.315-.94l-.134-.292a4.586 4.586 0 0 0-1.414 1.01l.233.222Zm.092.227a7.409 7.409 0 0 0-.05-.364l-.317.052c.019.115.035.231.048.348l.32-.036Zm-1.358-4.42a.61.61 0 0 0-.61.61h.321c0-.159.13-.288.289-.288v-.321Zm.61.61a.61.61 0 0 0-.61-.61v.322c.159 0 .288.13.288.289h.322Zm0 .483v-.482h-.322v.482h.322Zm-.61.61a.61.61 0 0 0 .61-.61h-.322c0 .159-.129.288-.288.288v.322Zm-.61-.61c0 .337.273.61.61.61v-.322a.289.289 0 0 1-.289-.288h-.322Zm0-.482v.482h.321v-.482h-.322Zm-1.439-.04a.25.25 0 0 1 .25-.249v-.321a.571.571 0 0 0-.571.57h.321Zm0 .56v-.56h-.321v.56h.321Zm.25.25a.25.25 0 0 1-.25-.25h-.321c0 .316.255.572.57.572v-.322Zm.25-.25a.25.25 0 0 1-.25.25v.322a.571.571 0 0 0 .57-.571h-.32Zm0-.56v.56h.32v-.56h-.32Zm-.25-.249a.25.25 0 0 1 .25.25h.32a.571.571 0 0 0-.57-.571v.321Z"/></g><path fill="#fff" fill-rule="evenodd" d="M6.926 14.09a5.032 5.032 0 0 0 .435-2.395 5.01 5.01 0 0 1-.78 2.336c.114.024.23.044.345.06Z" clip-rule="evenodd"/><path fill="#fff" d="M9.52 7.248a.818.818 0 0 0 0 1.636V7.248Z"/><mask id="c" width="8" height="8" x="5" y="2" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M12.178 2.499h-7.01v7.397h7.01V2.499Z"/><path fill="#000" fill-rule="evenodd" d="M9.557 3.12a11.62 11.62 0 0 1-1.189 6.47 2.725 2.725 0 0 1-.401-.183 11.628 11.628 0 0 0 1.06-6.471c.172.08.35.142.53.184Z" clip-rule="evenodd"/></mask><g mask="url(#c)"><path fill="#fff" d="m8.368 9.59.11.055-.05.096-.1-.036.04-.115Zm1.19-6.47.028-.118.084.02.009.086-.121.012Zm-1.59 6.287-.06.107-.1-.056.05-.104.11.053Zm1.06-6.471-.121.014-.027-.219.2.094-.052.11ZM8.26 9.535a11.498 11.498 0 0 0 1.176-6.402l.243-.025c.23 2.206-.158 4.48-1.202 6.537l-.217-.11ZM8.027 9.3c.124.069.252.127.383.174l-.083.23a2.839 2.839 0 0 1-.42-.191l.12-.213Zm1.122-6.38a11.75 11.75 0 0 1-1.072 6.54l-.22-.107a11.506 11.506 0 0 0 1.05-6.404l.242-.03Zm.38.318a2.842 2.842 0 0 1-.553-.193l.104-.22c.164.076.333.135.506.176l-.056.237Z"/></g><path fill="#fff" fill-rule="evenodd" d="m11.211 2.97-.17-.07-.051.176.158.046-.158-.046v.002l-.001.002-.003.01a1.717 1.717 0 0 0-.037.157 3.648 3.648 0 0 0-.063.414c-.03.324-.021.755.162 1.105a.107.107 0 0 1 .014.06c-.002.013-.005.017-.01.02-.211.155-.689.444-1.486.62a11.57 11.57 0 0 1-.018.173c.852-.18 1.367-.489 1.602-.66.09-.067.096-.19.044-.29-.24-.458-.147-1.106-.084-1.405.02-.1.038-.162.038-.162.026.01.052.018.077.023.483.082.993-.862 1.204-1.305a.197.197 0 0 0-.133-.281C11.06 1.264 5.27.132 4.371 4.47a.191.191 0 0 0 .05.176c.257.247 1.24 1.04 3.353 1.126a7.68 7.68 0 0 0 1.262-.047l.018-.17c-.37.05-.794.072-1.274.052-2.07-.083-3.014-.858-3.244-1.08l-.002-.006a.038.038 0 0 1 0-.017c.215-1.045.723-1.752 1.377-2.227.659-.477 1.476-.727 2.317-.836 1.684-.218 3.417.132 4.03.278.014.004.02.01.023.017.004.008.005.019-.001.033-.11.23-.298.589-.515.862-.11.137-.218.242-.319.301-.098.058-.171.064-.235.038Z" clip-rule="evenodd"/><mask id="d" width="7" height="7" x="3" y="8" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M8.026 10.726A4.425 4.425 0 0 1 9.39 9.75a2.728 2.728 0 0 1-2.22-1.012c.158.307.279.63.361.96a4.454 4.454 0 0 1-4.154 1.615 4.435 4.435 0 0 0 1.401 1.872c.884.69 1.947.995 2.985.938a7.227 7.227 0 0 0 .263-3.397Z" clip-rule="evenodd"/></mask><g mask="url(#d)"><path fill="#fff" d="m9.39 9.75-.006-.203.091.388-.084-.185Zm-1.364.976-.2.032-.016-.1.07-.072.146.14ZM7.17 8.738l-.18.093.338-.22-.158.127Zm.362.96.197-.048.024.097-.063.08-.158-.128Zm-4.155 1.615-.189.074-.13-.329.35.054-.03.2Zm4.387 2.81.193.063-.043.132-.139.008-.011-.203Zm1.711-4.188c-.478.22-.921.531-1.301.93l-.295-.28c.416-.437.902-.779 1.427-1.02l.17.37Zm-1.738-.924a2.525 2.525 0 0 0 1.647.536l.014.407a2.932 2.932 0 0 1-1.911-.623l.25-.32Zm-.41-.4c.119.145.255.28.41.4l-.25.32a2.952 2.952 0 0 1-.475-.464l.316-.257Zm.008 1.137a4.251 4.251 0 0 0-.346-.917l.362-.186c.165.321.291.659.378 1.005l-.394.098Zm-3.927 1.364a4.25 4.25 0 0 0 3.965-1.54l.317.254a4.657 4.657 0 0 1-4.344 1.688l.062-.402Zm1.245 2.233a4.638 4.638 0 0 1-1.465-1.958l.378-.149a4.231 4.231 0 0 0 1.337 1.787l-.25.32Zm3.122.98a4.64 4.64 0 0 1-3.122-.98l.25-.32c.844.66 1.858.95 2.85.895l.022.406Zm.452-3.632a7.43 7.43 0 0 1-.27 3.493l-.386-.126a7.024 7.024 0 0 0 .255-3.302l.401-.065Z"/></g></g></svg>
diff --git a/assets/icons/sweep_ai_disabled.svg b/assets/icons/sweep_ai_disabled.svg
new file mode 100644
index 00000000000..b15a8d8526f
--- /dev/null
+++ b/assets/icons/sweep_ai_disabled.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><g opacity=".34"><mask id="a" width="10" height="14" x="3" y="1" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M12.635 1H3v14h9.635V1Z"/></mask><g mask="url(#a)"><path fill="#fff" fill-rule="evenodd" d="M7.774 5.773a7.68 7.68 0 0 0 1.262-.048 11.578 11.578 0 0 1-1.07 3.683 2.76 2.76 0 0 1-.796-.67c.158.308.279.63.361.961a4.438 4.438 0 0 1-1.32 1.112c-1.4-.503-2.375-1.68-2.375-3.38 0-.968.316-1.86.846-2.569.458.333 1.421.843 3.092.91Zm.3 5.31c2.102-.047 3.537-.8 4.56-3.652-1.135 0-1.41-.823-1.716-1.739-.051-.155-.104-.314-.162-.47-.283.146-.681.307-1.208.418a11.577 11.577 0 0 1-1.18 3.95c.33.12.678.173 1.022.16-.501.231-.966.557-1.364.976.02.118.035.237.049.356ZM6.428 7.254a.45.45 0 0 1 .898 0v.482a.45.45 0 1 1-.898 0v-.482Zm-1.35-.45a.41.41 0 0 0-.41.41v.561a.41.41 0 0 0 .82 0v-.56a.41.41 0 0 0-.41-.41Z" clip-rule="evenodd"/><mask id="b" width="10" height="8" x="3" y="4" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M7.774 5.773a7.68 7.68 0 0 0 1.262-.048 11.578 11.578 0 0 1-1.07 3.683 2.76 2.76 0 0 1-.796-.67c.158.308.279.63.361.961a4.438 4.438 0 0 1-1.32 1.112c-1.4-.503-2.375-1.68-2.375-3.38 0-.968.316-1.86.846-2.569.458.333 1.421.843 3.092.91Zm.3 5.31c2.102-.047 3.537-.8 4.56-3.652-1.135 0-1.41-.823-1.716-1.739-.051-.155-.104-.314-.162-.47-.283.146-.681.307-1.208.418a11.577 11.577 0 0 1-1.18 3.95c.33.12.678.173 1.022.16-.501.231-.966.557-1.364.976.02.118.035.237.049.356ZM6.428 7.254a.45.45 0 0 1 .898 0v.482a.45.45 0 1 1-.898 0v-.482Zm-1.35-.45a.41.41 0 0 0-.41.41v.561a.41.41 0 0 0 .82 0v-.56a.41.41 0 0 0-.41-.41Z" clip-rule="evenodd"/></mask><g mask="url(#b)"><path fill="#fff" d="m9.035 5.725.16.018.024-.203-.203.025.02.16ZM7.966 9.407l-.078.14.149.084.074-.154-.145-.07ZM7.17 8.74l.125-.102-.268.175.143-.073Zm.362.96.125.1.05-.061-.02-.078-.155.04Zm-1.32 1.112-.054.151.068.024.064-.035-.078-.14ZM4.682 4.862l.095-.13-.129-.093-.095.127.129.096Zm3.392 6.22-.16.018.017.146.147-.003-.004-.161Zm4.56-3.651.151.054.077-.215h-.228v.16Zm-1.879-2.21.151-.056-.063-.171-.162.084.074.143Zm-1.207.418-.034-.157-.113.024-.013.116.16.017ZM8.368 9.59l-.144-.072-.082.162.17.062.055-.152Zm1.022.16.067.147-.073-.307.006.16Zm-1.364.976-.117-.11-.055.057.013.079.159-.026Zm.99-5.16a7.517 7.517 0 0 1-1.236.046l-.013.321c.48.02.91-.001 1.288-.049l-.04-.319ZM8.11 9.476a11.74 11.74 0 0 0 1.084-3.734l-.32-.037a11.416 11.416 0 0 1-1.054 3.632l.29.14Zm-.066-.21a2.599 2.599 0 0 1-.335-.222l-.198.253c.12.094.246.178.376.25l.157-.281Zm-.335-.222a2.585 2.585 0 0 1-.416-.408l-.25.203c.136.167.292.32.468.458l.198-.253Zm-.684-.233c.153.296.27.607.349.926l.312-.078a4.613 4.613 0 0 0-.375-.995l-.286.147Zm.38.787c-.362.45-.796.808-1.272 1.07l.155.282c.513-.282.98-.668 1.367-1.151l-.25-.202ZM3.675 7.43c0 1.774 1.023 3.007 2.482 3.531l.109-.303c-1.342-.481-2.27-1.6-2.27-3.228h-.321Zm.878-2.665a4.436 4.436 0 0 0-.878 2.665h.321c0-.933.305-1.79.815-2.473l-.258-.192Zm3.227.846c-1.638-.066-2.571-.565-3.003-.88l-.19.26c.483.351 1.477.872 3.18.941l.013-.321Zm.298 5.63c1.068-.023 1.99-.227 2.776-.804.784-.576 1.414-1.51 1.931-2.953l-.302-.109c-.506 1.41-1.106 2.278-1.82 2.803-.713.524-1.56.72-2.592.742l.007.322Zm4.556-3.972c-.52 0-.825-.184-1.042-.464-.229-.294-.366-.7-.522-1.165l-.305.102c.15.45.304.914.573 1.26.28.361.68.588 1.296.588V7.27ZM11.07 5.64a15.68 15.68 0 0 0-.164-.476l-.302.112c.057.154.11.31.162.466l.304-.102Zm-.389-.563c-.27.14-.654.296-1.167.404l.067.315c.542-.114.953-.28 1.248-.433l-.148-.286Zm-1.293.544a11.415 11.415 0 0 1-1.164 3.896l.287.145a11.738 11.738 0 0 0 1.196-4.006l-.32-.035ZM9.384 9.59a2.577 2.577 0 0 1-.962-.151l-.11.303c.352.126.72.182 1.084.17l-.012-.322Zm-1.242 1.247a4.264 4.264 0 0 1 1.315-.94l-.134-.292a4.586 4.586 0 0 0-1.414 1.01l.233.222Zm.092.227a7.409 7.409 0 0 0-.05-.364l-.317.052c.019.115.035.231.048.348l.32-.036Zm-1.358-4.42a.61.61 0 0 0-.61.61h.321c0-.159.13-.288.289-.288v-.321Zm.61.61a.61.61 0 0 0-.61-.61v.322c.159 0 .288.13.288.289h.322Zm0 .483v-.482h-.322v.482h.322Zm-.61.61a.61.61 0 0 0 .61-.61h-.322c0 .159-.129.288-.288.288v.322Zm-.61-.61c0 .337.273.61.61.61v-.322a.289.289 0 0 1-.289-.288h-.322Zm0-.482v.482h.321v-.482h-.322Zm-1.439-.04a.25.25 0 0 1 .25-.249v-.321a.571.571 0 0 0-.571.57h.321Zm0 .56v-.56h-.321v.56h.321Zm.25.25a.25.25 0 0 1-.25-.25h-.321c0 .316.255.572.57.572v-.322Zm.25-.25a.25.25 0 0 1-.25.25v.322a.571.571 0 0 0 .57-.571h-.32Zm0-.56v.56h.32v-.56h-.32Zm-.25-.249a.25.25 0 0 1 .25.25h.32a.571.571 0 0 0-.57-.571v.321Z"/></g><path fill="#fff" fill-rule="evenodd" d="M6.926 14.09a5.032 5.032 0 0 0 .435-2.395 5.01 5.01 0 0 1-.78 2.336c.114.024.23.044.345.06Z" clip-rule="evenodd"/><path fill="#fff" d="M9.52 7.248a.818.818 0 0 0 0 1.636V7.248Z"/><mask id="c" width="8" height="8" x="5" y="2" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M12.178 2.499h-7.01v7.397h7.01V2.499Z"/><path fill="#000" fill-rule="evenodd" d="M9.557 3.12a11.62 11.62 0 0 1-1.189 6.47 2.725 2.725 0 0 1-.401-.183 11.628 11.628 0 0 0 1.06-6.471c.172.08.35.142.53.184Z" clip-rule="evenodd"/></mask><g mask="url(#c)"><path fill="#fff" d="m8.368 9.59.11.055-.05.096-.1-.036.04-.115Zm1.19-6.47.028-.118.084.02.009.086-.121.012Zm-1.59 6.287-.06.107-.1-.056.05-.104.11.053Zm1.06-6.471-.121.014-.027-.219.2.094-.052.11ZM8.26 9.535a11.498 11.498 0 0 0 1.176-6.402l.243-.025c.23 2.206-.158 4.48-1.202 6.537l-.217-.11ZM8.027 9.3c.124.069.252.127.383.174l-.083.23a2.839 2.839 0 0 1-.42-.191l.12-.213Zm1.122-6.38a11.75 11.75 0 0 1-1.072 6.54l-.22-.107a11.506 11.506 0 0 0 1.05-6.404l.242-.03Zm.38.318a2.842 2.842 0 0 1-.553-.193l.104-.22c.164.076.333.135.506.176l-.056.237Z"/></g><path fill="#fff" fill-rule="evenodd" d="m11.211 2.97-.17-.07-.051.176.158.046-.158-.046v.002l-.001.002-.003.01a1.717 1.717 0 0 0-.037.157 3.648 3.648 0 0 0-.063.414c-.03.324-.021.755.162 1.105a.107.107 0 0 1 .014.06c-.002.013-.005.017-.01.02-.211.155-.689.444-1.486.62a11.57 11.57 0 0 1-.018.173c.852-.18 1.367-.489 1.602-.66.09-.067.096-.19.044-.29-.24-.458-.147-1.106-.084-1.405.02-.1.038-.162.038-.162.026.01.052.018.077.023.483.082.993-.862 1.204-1.305a.197.197 0 0 0-.133-.281C11.06 1.264 5.27.132 4.371 4.47a.191.191 0 0 0 .05.176c.257.247 1.24 1.04 3.353 1.126a7.68 7.68 0 0 0 1.262-.047l.018-.17c-.37.05-.794.072-1.274.052-2.07-.083-3.014-.858-3.244-1.08l-.002-.006a.038.038 0 0 1 0-.017c.215-1.045.723-1.752 1.377-2.227.659-.477 1.476-.727 2.317-.836 1.684-.218 3.417.132 4.03.278.014.004.02.01.023.017.004.008.005.019-.001.033-.11.23-.298.589-.515.862-.11.137-.218.242-.319.301-.098.058-.171.064-.235.038Z" clip-rule="evenodd"/><mask id="d" width="7" height="7" x="3" y="8" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M8.026 10.726A4.425 4.425 0 0 1 9.39 9.75a2.728 2.728 0 0 1-2.22-1.012c.158.307.279.63.361.96a4.454 4.454 0 0 1-4.154 1.615 4.435 4.435 0 0 0 1.401 1.872c.884.69 1.947.995 2.985.938a7.227 7.227 0 0 0 .263-3.397Z" clip-rule="evenodd"/></mask><g mask="url(#d)"><path fill="#fff" d="m9.39 9.75-.006-.203.091.388-.084-.185Zm-1.364.976-.2.032-.016-.1.07-.072.146.14ZM7.17 8.738l-.18.093.338-.22-.158.127Zm.362.96.197-.048.024.097-.063.08-.158-.128Zm-4.155 1.615-.189.074-.13-.329.35.054-.03.2Zm4.387 2.81.193.063-.043.132-.139.008-.011-.203Zm1.711-4.188c-.478.22-.921.531-1.301.93l-.295-.28c.416-.437.902-.779 1.427-1.02l.17.37Zm-1.738-.924a2.525 2.525 0 0 0 1.647.536l.014.407a2.932 2.932 0 0 1-1.911-.623l.25-.32Zm-.41-.4c.119.145.255.28.41.4l-.25.32a2.952 2.952 0 0 1-.475-.464l.316-.257Zm.008 1.137a4.251 4.251 0 0 0-.346-.917l.362-.186c.165.321.291.659.378 1.005l-.394.098Zm-3.927 1.364a4.25 4.25 0 0 0 3.965-1.54l.317.254a4.657 4.657 0 0 1-4.344 1.688l.062-.402Zm1.245 2.233a4.638 4.638 0 0 1-1.465-1.958l.378-.149a4.231 4.231 0 0 0 1.337 1.787l-.25.32Zm3.122.98a4.64 4.64 0 0 1-3.122-.98l.25-.32c.844.66 1.858.95 2.85.895l.022.406Zm.452-3.632a7.43 7.43 0 0 1-.27 3.493l-.386-.126a7.024 7.024 0 0 0 .255-3.302l.401-.065Z"/></g></g></g><path fill="#fff" fill-rule="evenodd" d="M14.02 13.708a.25.25 0 0 1-.352.031L1.09 3.3a.25.25 0 0 1-.032-.353l.717-.856a.25.25 0 0 1 .351-.032l12.578 10.44a.25.25 0 0 1 .032.353l-.716.857Z" clip-rule="evenodd"/></svg>
diff --git a/assets/icons/sweep_ai_down.svg b/assets/icons/sweep_ai_down.svg
new file mode 100644
index 00000000000..f08dcb17181
--- /dev/null
+++ b/assets/icons/sweep_ai_down.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><g opacity=".7"><mask id="a" width="10" height="14" x="3" y="1" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M12.635 1H3v14h9.635V1Z"/></mask><g mask="url(#a)"><path fill="#fff" fill-rule="evenodd" d="M7.774 5.773a7.68 7.68 0 0 0 1.262-.048 11.578 11.578 0 0 1-1.07 3.683 2.76 2.76 0 0 1-.796-.67c.158.308.279.63.361.961a4.438 4.438 0 0 1-1.32 1.112c-1.4-.503-2.375-1.68-2.375-3.38 0-.968.316-1.86.846-2.569.458.333 1.421.843 3.092.91Zm.3 5.31c2.102-.047 3.537-.8 4.56-3.652-1.135 0-1.41-.823-1.716-1.739-.051-.155-.104-.314-.162-.47-.283.146-.681.307-1.208.418a11.577 11.577 0 0 1-1.18 3.95c.33.12.678.173 1.022.16-.501.231-.966.557-1.364.976.02.118.035.237.049.356ZM6.428 7.254a.45.45 0 0 1 .898 0v.482a.45.45 0 1 1-.898 0v-.482Zm-1.35-.45a.41.41 0 0 0-.41.41v.561a.41.41 0 0 0 .82 0v-.56a.41.41 0 0 0-.41-.41Z" clip-rule="evenodd"/><mask id="b" width="10" height="8" x="3" y="4" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M7.774 5.773a7.68 7.68 0 0 0 1.262-.048 11.578 11.578 0 0 1-1.07 3.683 2.76 2.76 0 0 1-.796-.67c.158.308.279.63.361.961a4.438 4.438 0 0 1-1.32 1.112c-1.4-.503-2.375-1.68-2.375-3.38 0-.968.316-1.86.846-2.569.458.333 1.421.843 3.092.91Zm.3 5.31c2.102-.047 3.537-.8 4.56-3.652-1.135 0-1.41-.823-1.716-1.739-.051-.155-.104-.314-.162-.47-.283.146-.681.307-1.208.418a11.577 11.577 0 0 1-1.18 3.95c.33.12.678.173 1.022.16-.501.231-.966.557-1.364.976.02.118.035.237.049.356ZM6.428 7.254a.45.45 0 0 1 .898 0v.482a.45.45 0 1 1-.898 0v-.482Zm-1.35-.45a.41.41 0 0 0-.41.41v.561a.41.41 0 0 0 .82 0v-.56a.41.41 0 0 0-.41-.41Z" clip-rule="evenodd"/></mask><g mask="url(#b)"><path fill="#fff" d="m9.035 5.725.16.018.024-.203-.203.025.02.16ZM7.966 9.407l-.078.14.149.084.074-.154-.145-.07ZM7.17 8.74l.125-.102-.268.175.143-.073Zm.362.96.125.1.05-.061-.02-.078-.155.04Zm-1.32 1.112-.054.151.068.024.064-.035-.078-.14ZM4.682 4.862l.095-.13-.129-.093-.095.127.129.096Zm3.392 6.22-.16.018.017.146.147-.003-.004-.161Zm4.56-3.651.151.054.077-.215h-.228v.16Zm-1.879-2.21.151-.056-.063-.171-.162.084.074.143Zm-1.207.418-.034-.157-.113.024-.013.116.16.017ZM8.368 9.59l-.144-.072-.082.162.17.062.055-.152Zm1.022.16.067.147-.073-.307.006.16Zm-1.364.976-.117-.11-.055.057.013.079.159-.026Zm.99-5.16a7.517 7.517 0 0 1-1.236.046l-.013.321c.48.02.91-.001 1.288-.049l-.04-.319ZM8.11 9.476a11.74 11.74 0 0 0 1.084-3.734l-.32-.037a11.416 11.416 0 0 1-1.054 3.632l.29.14Zm-.066-.21a2.599 2.599 0 0 1-.335-.222l-.198.253c.12.094.246.178.376.25l.157-.281Zm-.335-.222a2.585 2.585 0 0 1-.416-.408l-.25.203c.136.167.292.32.468.458l.198-.253Zm-.684-.233c.153.296.27.607.349.926l.312-.078a4.613 4.613 0 0 0-.375-.995l-.286.147Zm.38.787c-.362.45-.796.808-1.272 1.07l.155.282c.513-.282.98-.668 1.367-1.151l-.25-.202ZM3.675 7.43c0 1.774 1.023 3.007 2.482 3.531l.109-.303c-1.342-.481-2.27-1.6-2.27-3.228h-.321Zm.878-2.665a4.436 4.436 0 0 0-.878 2.665h.321c0-.933.305-1.79.815-2.473l-.258-.192Zm3.227.846c-1.638-.066-2.571-.565-3.003-.88l-.19.26c.483.351 1.477.872 3.18.941l.013-.321Zm.298 5.63c1.068-.023 1.99-.227 2.776-.804.784-.576 1.414-1.51 1.931-2.953l-.302-.109c-.506 1.41-1.106 2.278-1.82 2.803-.713.524-1.56.72-2.592.742l.007.322Zm4.556-3.972c-.52 0-.825-.184-1.042-.464-.229-.294-.366-.7-.522-1.165l-.305.102c.15.45.304.914.573 1.26.28.361.68.588 1.296.588V7.27ZM11.07 5.64a15.68 15.68 0 0 0-.164-.476l-.302.112c.057.154.11.31.162.466l.304-.102Zm-.389-.563c-.27.14-.654.296-1.167.404l.067.315c.542-.114.953-.28 1.248-.433l-.148-.286Zm-1.293.544a11.415 11.415 0 0 1-1.164 3.896l.287.145a11.738 11.738 0 0 0 1.196-4.006l-.32-.035ZM9.384 9.59a2.577 2.577 0 0 1-.962-.151l-.11.303c.352.126.72.182 1.084.17l-.012-.322Zm-1.242 1.247a4.264 4.264 0 0 1 1.315-.94l-.134-.292a4.586 4.586 0 0 0-1.414 1.01l.233.222Zm.092.227a7.409 7.409 0 0 0-.05-.364l-.317.052c.019.115.035.231.048.348l.32-.036Zm-1.358-4.42a.61.61 0 0 0-.61.61h.321c0-.159.13-.288.289-.288v-.321Zm.61.61a.61.61 0 0 0-.61-.61v.322c.159 0 .288.13.288.289h.322Zm0 .483v-.482h-.322v.482h.322Zm-.61.61a.61.61 0 0 0 .61-.61h-.322c0 .159-.129.288-.288.288v.322Zm-.61-.61c0 .337.273.61.61.61v-.322a.289.289 0 0 1-.289-.288h-.322Zm0-.482v.482h.321v-.482h-.322Zm-1.439-.04a.25.25 0 0 1 .25-.249v-.321a.571.571 0 0 0-.571.57h.321Zm0 .56v-.56h-.321v.56h.321Zm.25.25a.25.25 0 0 1-.25-.25h-.321c0 .316.255.572.57.572v-.322Zm.25-.25a.25.25 0 0 1-.25.25v.322a.571.571 0 0 0 .57-.571h-.32Zm0-.56v.56h.32v-.56h-.32Zm-.25-.249a.25.25 0 0 1 .25.25h.32a.571.571 0 0 0-.57-.571v.321Z"/></g><path fill="#fff" fill-rule="evenodd" d="M6.926 14.09a5.032 5.032 0 0 0 .435-2.395 5.01 5.01 0 0 1-.78 2.336c.114.024.23.044.345.06Z" clip-rule="evenodd"/><path fill="#fff" d="M9.52 7.248a.818.818 0 0 0 0 1.636V7.248Z"/><mask id="c" width="8" height="8" x="5" y="2" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M12.178 2.499h-7.01v7.397h7.01V2.499Z"/><path fill="#000" fill-rule="evenodd" d="M9.557 3.12a11.62 11.62 0 0 1-1.189 6.47 2.725 2.725 0 0 1-.401-.183 11.628 11.628 0 0 0 1.06-6.471c.172.08.35.142.53.184Z" clip-rule="evenodd"/></mask><g mask="url(#c)"><path fill="#fff" d="m8.368 9.59.11.055-.05.096-.1-.036.04-.115Zm1.19-6.47.028-.118.084.02.009.086-.121.012Zm-1.59 6.287-.06.107-.1-.056.05-.104.11.053Zm1.06-6.471-.121.014-.027-.219.2.094-.052.11ZM8.26 9.535a11.498 11.498 0 0 0 1.176-6.402l.243-.025c.23 2.206-.158 4.48-1.202 6.537l-.217-.11ZM8.027 9.3c.124.069.252.127.383.174l-.083.23a2.839 2.839 0 0 1-.42-.191l.12-.213Zm1.122-6.38a11.75 11.75 0 0 1-1.072 6.54l-.22-.107a11.506 11.506 0 0 0 1.05-6.404l.242-.03Zm.38.318a2.842 2.842 0 0 1-.553-.193l.104-.22c.164.076.333.135.506.176l-.056.237Z"/></g><path fill="#fff" fill-rule="evenodd" d="m11.211 2.97-.17-.07-.051.176.158.046-.158-.046v.002l-.001.002-.003.01a1.717 1.717 0 0 0-.037.157 3.648 3.648 0 0 0-.063.414c-.03.324-.021.755.162 1.105a.107.107 0 0 1 .014.06c-.002.013-.005.017-.01.02-.211.155-.689.444-1.486.62a11.57 11.57 0 0 1-.018.173c.852-.18 1.367-.489 1.602-.66.09-.067.096-.19.044-.29-.24-.458-.147-1.106-.084-1.405.02-.1.038-.162.038-.162.026.01.052.018.077.023.483.082.993-.862 1.204-1.305a.197.197 0 0 0-.133-.281C11.06 1.264 5.27.132 4.371 4.47a.191.191 0 0 0 .05.176c.257.247 1.24 1.04 3.353 1.126a7.68 7.68 0 0 0 1.262-.047l.018-.17c-.37.05-.794.072-1.274.052-2.07-.083-3.014-.858-3.244-1.08l-.002-.006a.038.038 0 0 1 0-.017c.215-1.045.723-1.752 1.377-2.227.659-.477 1.476-.727 2.317-.836 1.684-.218 3.417.132 4.03.278.014.004.02.01.023.017.004.008.005.019-.001.033-.11.23-.298.589-.515.862-.11.137-.218.242-.319.301-.098.058-.171.064-.235.038Z" clip-rule="evenodd"/><mask id="d" width="7" height="7" x="3" y="8" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M8.026 10.726A4.425 4.425 0 0 1 9.39 9.75a2.728 2.728 0 0 1-2.22-1.012c.158.307.279.63.361.96a4.454 4.454 0 0 1-4.154 1.615 4.435 4.435 0 0 0 1.401 1.872c.884.69 1.947.995 2.985.938a7.227 7.227 0 0 0 .263-3.397Z" clip-rule="evenodd"/></mask><g mask="url(#d)"><path fill="#fff" d="m9.39 9.75-.006-.203.091.388-.084-.185Zm-1.364.976-.2.032-.016-.1.07-.072.146.14ZM7.17 8.738l-.18.093.338-.22-.158.127Zm.362.96.197-.048.024.097-.063.08-.158-.128Zm-4.155 1.615-.189.074-.13-.329.35.054-.03.2Zm4.387 2.81.193.063-.043.132-.139.008-.011-.203Zm1.711-4.188c-.478.22-.921.531-1.301.93l-.295-.28c.416-.437.902-.779 1.427-1.02l.17.37Zm-1.738-.924a2.525 2.525 0 0 0 1.647.536l.014.407a2.932 2.932 0 0 1-1.911-.623l.25-.32Zm-.41-.4c.119.145.255.28.41.4l-.25.32a2.952 2.952 0 0 1-.475-.464l.316-.257Zm.008 1.137a4.251 4.251 0 0 0-.346-.917l.362-.186c.165.321.291.659.378 1.005l-.394.098Zm-3.927 1.364a4.25 4.25 0 0 0 3.965-1.54l.317.254a4.657 4.657 0 0 1-4.344 1.688l.062-.402Zm1.245 2.233a4.638 4.638 0 0 1-1.465-1.958l.378-.149a4.231 4.231 0 0 0 1.337 1.787l-.25.32Zm3.122.98a4.64 4.64 0 0 1-3.122-.98l.25-.32c.844.66 1.858.95 2.85.895l.022.406Zm.452-3.632a7.43 7.43 0 0 1-.27 3.493l-.386-.126a7.024 7.024 0 0 0 .255-3.302l.401-.065Z"/></g></g></g><path stroke="#fff" stroke-width="1.2" d="m15 9.333-.5.333-2 1.334-2-1.334-.5-.333M12.5 11V4.5"/></svg>
diff --git a/assets/icons/sweep_ai_error.svg b/assets/icons/sweep_ai_error.svg
new file mode 100644
index 00000000000..95285a1273e
--- /dev/null
+++ b/assets/icons/sweep_ai_error.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><g opacity=".7"><mask id="a" width="10" height="14" x="3" y="1" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M12.635 1H3v14h9.635V1Z"/></mask><g mask="url(#a)"><path fill="#fff" fill-rule="evenodd" d="M7.774 5.773a7.68 7.68 0 0 0 1.262-.048 11.578 11.578 0 0 1-1.07 3.683 2.76 2.76 0 0 1-.796-.67c.158.308.279.63.361.961a4.438 4.438 0 0 1-1.32 1.112c-1.4-.503-2.375-1.68-2.375-3.38 0-.968.316-1.86.846-2.569.458.333 1.421.843 3.092.91Zm.3 5.31c2.102-.047 3.537-.8 4.56-3.652-1.135 0-1.41-.823-1.716-1.739-.051-.155-.104-.314-.162-.47-.283.146-.681.307-1.208.418a11.577 11.577 0 0 1-1.18 3.95c.33.12.678.173 1.022.16-.501.231-.966.557-1.364.976.02.118.035.237.049.356ZM6.428 7.254a.45.45 0 0 1 .898 0v.482a.45.45 0 1 1-.898 0v-.482Zm-1.35-.45a.41.41 0 0 0-.41.41v.561a.41.41 0 0 0 .82 0v-.56a.41.41 0 0 0-.41-.41Z" clip-rule="evenodd"/><mask id="b" width="10" height="8" x="3" y="4" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M7.774 5.773a7.68 7.68 0 0 0 1.262-.048 11.578 11.578 0 0 1-1.07 3.683 2.76 2.76 0 0 1-.796-.67c.158.308.279.63.361.961a4.438 4.438 0 0 1-1.32 1.112c-1.4-.503-2.375-1.68-2.375-3.38 0-.968.316-1.86.846-2.569.458.333 1.421.843 3.092.91Zm.3 5.31c2.102-.047 3.537-.8 4.56-3.652-1.135 0-1.41-.823-1.716-1.739-.051-.155-.104-.314-.162-.47-.283.146-.681.307-1.208.418a11.577 11.577 0 0 1-1.18 3.95c.33.12.678.173 1.022.16-.501.231-.966.557-1.364.976.02.118.035.237.049.356ZM6.428 7.254a.45.45 0 0 1 .898 0v.482a.45.45 0 1 1-.898 0v-.482Zm-1.35-.45a.41.41 0 0 0-.41.41v.561a.41.41 0 0 0 .82 0v-.56a.41.41 0 0 0-.41-.41Z" clip-rule="evenodd"/></mask><g mask="url(#b)"><path fill="#fff" d="m9.035 5.725.16.018.024-.203-.203.025.02.16ZM7.966 9.407l-.078.14.149.084.074-.154-.145-.07ZM7.17 8.74l.125-.102-.268.175.143-.073Zm.362.96.125.1.05-.061-.02-.078-.155.04Zm-1.32 1.112-.054.151.068.024.064-.035-.078-.14ZM4.682 4.862l.095-.13-.129-.093-.095.127.129.096Zm3.392 6.22-.16.018.017.146.147-.003-.004-.161Zm4.56-3.651.151.054.077-.215h-.228v.16Zm-1.879-2.21.151-.056-.063-.171-.162.084.074.143Zm-1.207.418-.034-.157-.113.024-.013.116.16.017ZM8.368 9.59l-.144-.072-.082.162.17.062.055-.152Zm1.022.16.067.147-.073-.307.006.16Zm-1.364.976-.117-.11-.055.057.013.079.159-.026Zm.99-5.16a7.517 7.517 0 0 1-1.236.046l-.013.321c.48.02.91-.001 1.288-.049l-.04-.319ZM8.11 9.476a11.74 11.74 0 0 0 1.084-3.734l-.32-.037a11.416 11.416 0 0 1-1.054 3.632l.29.14Zm-.066-.21a2.599 2.599 0 0 1-.335-.222l-.198.253c.12.094.246.178.376.25l.157-.281Zm-.335-.222a2.585 2.585 0 0 1-.416-.408l-.25.203c.136.167.292.32.468.458l.198-.253Zm-.684-.233c.153.296.27.607.349.926l.312-.078a4.613 4.613 0 0 0-.375-.995l-.286.147Zm.38.787c-.362.45-.796.808-1.272 1.07l.155.282c.513-.282.98-.668 1.367-1.151l-.25-.202ZM3.675 7.43c0 1.774 1.023 3.007 2.482 3.531l.109-.303c-1.342-.481-2.27-1.6-2.27-3.228h-.321Zm.878-2.665a4.436 4.436 0 0 0-.878 2.665h.321c0-.933.305-1.79.815-2.473l-.258-.192Zm3.227.846c-1.638-.066-2.571-.565-3.003-.88l-.19.26c.483.351 1.477.872 3.18.941l.013-.321Zm.298 5.63c1.068-.023 1.99-.227 2.776-.804.784-.576 1.414-1.51 1.931-2.953l-.302-.109c-.506 1.41-1.106 2.278-1.82 2.803-.713.524-1.56.72-2.592.742l.007.322Zm4.556-3.972c-.52 0-.825-.184-1.042-.464-.229-.294-.366-.7-.522-1.165l-.305.102c.15.45.304.914.573 1.26.28.361.68.588 1.296.588V7.27ZM11.07 5.64a15.68 15.68 0 0 0-.164-.476l-.302.112c.057.154.11.31.162.466l.304-.102Zm-.389-.563c-.27.14-.654.296-1.167.404l.067.315c.542-.114.953-.28 1.248-.433l-.148-.286Zm-1.293.544a11.415 11.415 0 0 1-1.164 3.896l.287.145a11.738 11.738 0 0 0 1.196-4.006l-.32-.035ZM9.384 9.59a2.577 2.577 0 0 1-.962-.151l-.11.303c.352.126.72.182 1.084.17l-.012-.322Zm-1.242 1.247a4.264 4.264 0 0 1 1.315-.94l-.134-.292a4.586 4.586 0 0 0-1.414 1.01l.233.222Zm.092.227a7.409 7.409 0 0 0-.05-.364l-.317.052c.019.115.035.231.048.348l.32-.036Zm-1.358-4.42a.61.61 0 0 0-.61.61h.321c0-.159.13-.288.289-.288v-.321Zm.61.61a.61.61 0 0 0-.61-.61v.322c.159 0 .288.13.288.289h.322Zm0 .483v-.482h-.322v.482h.322Zm-.61.61a.61.61 0 0 0 .61-.61h-.322c0 .159-.129.288-.288.288v.322Zm-.61-.61c0 .337.273.61.61.61v-.322a.289.289 0 0 1-.289-.288h-.322Zm0-.482v.482h.321v-.482h-.322Zm-1.439-.04a.25.25 0 0 1 .25-.249v-.321a.571.571 0 0 0-.571.57h.321Zm0 .56v-.56h-.321v.56h.321Zm.25.25a.25.25 0 0 1-.25-.25h-.321c0 .316.255.572.57.572v-.322Zm.25-.25a.25.25 0 0 1-.25.25v.322a.571.571 0 0 0 .57-.571h-.32Zm0-.56v.56h.32v-.56h-.32Zm-.25-.249a.25.25 0 0 1 .25.25h.32a.571.571 0 0 0-.57-.571v.321Z"/></g><path fill="#fff" fill-rule="evenodd" d="M6.926 14.09a5.032 5.032 0 0 0 .435-2.395 5.01 5.01 0 0 1-.78 2.336c.114.024.23.044.345.06Z" clip-rule="evenodd"/><path fill="#fff" d="M9.52 7.248a.818.818 0 0 0 0 1.636V7.248Z"/><mask id="c" width="8" height="8" x="5" y="2" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M12.178 2.499h-7.01v7.397h7.01V2.499Z"/><path fill="#000" fill-rule="evenodd" d="M9.557 3.12a11.62 11.62 0 0 1-1.189 6.47 2.725 2.725 0 0 1-.401-.183 11.628 11.628 0 0 0 1.06-6.471c.172.08.35.142.53.184Z" clip-rule="evenodd"/></mask><g mask="url(#c)"><path fill="#fff" d="m8.368 9.59.11.055-.05.096-.1-.036.04-.115Zm1.19-6.47.028-.118.084.02.009.086-.121.012Zm-1.59 6.287-.06.107-.1-.056.05-.104.11.053Zm1.06-6.471-.121.014-.027-.219.2.094-.052.11ZM8.26 9.535a11.498 11.498 0 0 0 1.176-6.402l.243-.025c.23 2.206-.158 4.48-1.202 6.537l-.217-.11ZM8.027 9.3c.124.069.252.127.383.174l-.083.23a2.839 2.839 0 0 1-.42-.191l.12-.213Zm1.122-6.38a11.75 11.75 0 0 1-1.072 6.54l-.22-.107a11.506 11.506 0 0 0 1.05-6.404l.242-.03Zm.38.318a2.842 2.842 0 0 1-.553-.193l.104-.22c.164.076.333.135.506.176l-.056.237Z"/></g><path fill="#fff" fill-rule="evenodd" d="m11.211 2.97-.17-.07-.051.176.158.046-.158-.046v.002l-.001.002-.003.01a1.717 1.717 0 0 0-.037.157 3.648 3.648 0 0 0-.063.414c-.03.324-.021.755.162 1.105a.107.107 0 0 1 .014.06c-.002.013-.005.017-.01.02-.211.155-.689.444-1.486.62a11.57 11.57 0 0 1-.018.173c.852-.18 1.367-.489 1.602-.66.09-.067.096-.19.044-.29-.24-.458-.147-1.106-.084-1.405.02-.1.038-.162.038-.162.026.01.052.018.077.023.483.082.993-.862 1.204-1.305a.197.197 0 0 0-.133-.281C11.06 1.264 5.27.132 4.371 4.47a.191.191 0 0 0 .05.176c.257.247 1.24 1.04 3.353 1.126a7.68 7.68 0 0 0 1.262-.047l.018-.17c-.37.05-.794.072-1.274.052-2.07-.083-3.014-.858-3.244-1.08l-.002-.006a.038.038 0 0 1 0-.017c.215-1.045.723-1.752 1.377-2.227.659-.477 1.476-.727 2.317-.836 1.684-.218 3.417.132 4.03.278.014.004.02.01.023.017.004.008.005.019-.001.033-.11.23-.298.589-.515.862-.11.137-.218.242-.319.301-.098.058-.171.064-.235.038Z" clip-rule="evenodd"/><mask id="d" width="7" height="7" x="3" y="8" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M8.026 10.726A4.425 4.425 0 0 1 9.39 9.75a2.728 2.728 0 0 1-2.22-1.012c.158.307.279.63.361.96a4.454 4.454 0 0 1-4.154 1.615 4.435 4.435 0 0 0 1.401 1.872c.884.69 1.947.995 2.985.938a7.227 7.227 0 0 0 .263-3.397Z" clip-rule="evenodd"/></mask><g mask="url(#d)"><path fill="#fff" d="m9.39 9.75-.006-.203.091.388-.084-.185Zm-1.364.976-.2.032-.016-.1.07-.072.146.14ZM7.17 8.738l-.18.093.338-.22-.158.127Zm.362.96.197-.048.024.097-.063.08-.158-.128Zm-4.155 1.615-.189.074-.13-.329.35.054-.03.2Zm4.387 2.81.193.063-.043.132-.139.008-.011-.203Zm1.711-4.188c-.478.22-.921.531-1.301.93l-.295-.28c.416-.437.902-.779 1.427-1.02l.17.37Zm-1.738-.924a2.525 2.525 0 0 0 1.647.536l.014.407a2.932 2.932 0 0 1-1.911-.623l.25-.32Zm-.41-.4c.119.145.255.28.41.4l-.25.32a2.952 2.952 0 0 1-.475-.464l.316-.257Zm.008 1.137a4.251 4.251 0 0 0-.346-.917l.362-.186c.165.321.291.659.378 1.005l-.394.098Zm-3.927 1.364a4.25 4.25 0 0 0 3.965-1.54l.317.254a4.657 4.657 0 0 1-4.344 1.688l.062-.402Zm1.245 2.233a4.638 4.638 0 0 1-1.465-1.958l.378-.149a4.231 4.231 0 0 0 1.337 1.787l-.25.32Zm3.122.98a4.64 4.64 0 0 1-3.122-.98l.25-.32c.844.66 1.858.95 2.85.895l.022.406Zm.452-3.632a7.43 7.43 0 0 1-.27 3.493l-.386-.126a7.024 7.024 0 0 0 .255-3.302l.401-.065Z"/></g></g></g><path stroke="#fff" stroke-width="1.2" d="m14 8-4 4m4 0-4-4"/></svg>
diff --git a/assets/icons/sweep_ai_up.svg b/assets/icons/sweep_ai_up.svg
new file mode 100644
index 00000000000..7c28282a6a1
--- /dev/null
+++ b/assets/icons/sweep_ai_up.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><g opacity=".7"><mask id="a" width="10" height="14" x="3" y="1" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M12.635 1H3v14h9.635V1Z"/></mask><g mask="url(#a)"><path fill="#fff" fill-rule="evenodd" d="M7.774 5.773a7.68 7.68 0 0 0 1.262-.048 11.578 11.578 0 0 1-1.07 3.683 2.76 2.76 0 0 1-.796-.67c.158.308.279.63.361.961a4.438 4.438 0 0 1-1.32 1.112c-1.4-.503-2.375-1.68-2.375-3.38 0-.968.316-1.86.846-2.569.458.333 1.421.843 3.092.91Zm.3 5.31c2.102-.047 3.537-.8 4.56-3.652-1.135 0-1.41-.823-1.716-1.739-.051-.155-.104-.314-.162-.47-.283.146-.681.307-1.208.418a11.577 11.577 0 0 1-1.18 3.95c.33.12.678.173 1.022.16-.501.231-.966.557-1.364.976.02.118.035.237.049.356ZM6.428 7.254a.45.45 0 0 1 .898 0v.482a.45.45 0 1 1-.898 0v-.482Zm-1.35-.45a.41.41 0 0 0-.41.41v.561a.41.41 0 0 0 .82 0v-.56a.41.41 0 0 0-.41-.41Z" clip-rule="evenodd"/><mask id="b" width="10" height="8" x="3" y="4" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M7.774 5.773a7.68 7.68 0 0 0 1.262-.048 11.578 11.578 0 0 1-1.07 3.683 2.76 2.76 0 0 1-.796-.67c.158.308.279.63.361.961a4.438 4.438 0 0 1-1.32 1.112c-1.4-.503-2.375-1.68-2.375-3.38 0-.968.316-1.86.846-2.569.458.333 1.421.843 3.092.91Zm.3 5.31c2.102-.047 3.537-.8 4.56-3.652-1.135 0-1.41-.823-1.716-1.739-.051-.155-.104-.314-.162-.47-.283.146-.681.307-1.208.418a11.577 11.577 0 0 1-1.18 3.95c.33.12.678.173 1.022.16-.501.231-.966.557-1.364.976.02.118.035.237.049.356ZM6.428 7.254a.45.45 0 0 1 .898 0v.482a.45.45 0 1 1-.898 0v-.482Zm-1.35-.45a.41.41 0 0 0-.41.41v.561a.41.41 0 0 0 .82 0v-.56a.41.41 0 0 0-.41-.41Z" clip-rule="evenodd"/></mask><g mask="url(#b)"><path fill="#fff" d="m9.035 5.725.16.018.024-.203-.203.025.02.16ZM7.966 9.407l-.078.14.149.084.074-.154-.145-.07ZM7.17 8.74l.125-.102-.268.175.143-.073Zm.362.96.125.1.05-.061-.02-.078-.155.04Zm-1.32 1.112-.054.151.068.024.064-.035-.078-.14ZM4.682 4.862l.095-.13-.129-.093-.095.127.129.096Zm3.392 6.22-.16.018.017.146.147-.003-.004-.161Zm4.56-3.651.151.054.077-.215h-.228v.16Zm-1.879-2.21.151-.056-.063-.171-.162.084.074.143Zm-1.207.418-.034-.157-.113.024-.013.116.16.017ZM8.368 9.59l-.144-.072-.082.162.17.062.055-.152Zm1.022.16.067.147-.073-.307.006.16Zm-1.364.976-.117-.11-.055.057.013.079.159-.026Zm.99-5.16a7.517 7.517 0 0 1-1.236.046l-.013.321c.48.02.91-.001 1.288-.049l-.04-.319ZM8.11 9.476a11.74 11.74 0 0 0 1.084-3.734l-.32-.037a11.416 11.416 0 0 1-1.054 3.632l.29.14Zm-.066-.21a2.599 2.599 0 0 1-.335-.222l-.198.253c.12.094.246.178.376.25l.157-.281Zm-.335-.222a2.585 2.585 0 0 1-.416-.408l-.25.203c.136.167.292.32.468.458l.198-.253Zm-.684-.233c.153.296.27.607.349.926l.312-.078a4.613 4.613 0 0 0-.375-.995l-.286.147Zm.38.787c-.362.45-.796.808-1.272 1.07l.155.282c.513-.282.98-.668 1.367-1.151l-.25-.202ZM3.675 7.43c0 1.774 1.023 3.007 2.482 3.531l.109-.303c-1.342-.481-2.27-1.6-2.27-3.228h-.321Zm.878-2.665a4.436 4.436 0 0 0-.878 2.665h.321c0-.933.305-1.79.815-2.473l-.258-.192Zm3.227.846c-1.638-.066-2.571-.565-3.003-.88l-.19.26c.483.351 1.477.872 3.18.941l.013-.321Zm.298 5.63c1.068-.023 1.99-.227 2.776-.804.784-.576 1.414-1.51 1.931-2.953l-.302-.109c-.506 1.41-1.106 2.278-1.82 2.803-.713.524-1.56.72-2.592.742l.007.322Zm4.556-3.972c-.52 0-.825-.184-1.042-.464-.229-.294-.366-.7-.522-1.165l-.305.102c.15.45.304.914.573 1.26.28.361.68.588 1.296.588V7.27ZM11.07 5.64a15.68 15.68 0 0 0-.164-.476l-.302.112c.057.154.11.31.162.466l.304-.102Zm-.389-.563c-.27.14-.654.296-1.167.404l.067.315c.542-.114.953-.28 1.248-.433l-.148-.286Zm-1.293.544a11.415 11.415 0 0 1-1.164 3.896l.287.145a11.738 11.738 0 0 0 1.196-4.006l-.32-.035ZM9.384 9.59a2.577 2.577 0 0 1-.962-.151l-.11.303c.352.126.72.182 1.084.17l-.012-.322Zm-1.242 1.247a4.264 4.264 0 0 1 1.315-.94l-.134-.292a4.586 4.586 0 0 0-1.414 1.01l.233.222Zm.092.227a7.409 7.409 0 0 0-.05-.364l-.317.052c.019.115.035.231.048.348l.32-.036Zm-1.358-4.42a.61.61 0 0 0-.61.61h.321c0-.159.13-.288.289-.288v-.321Zm.61.61a.61.61 0 0 0-.61-.61v.322c.159 0 .288.13.288.289h.322Zm0 .483v-.482h-.322v.482h.322Zm-.61.61a.61.61 0 0 0 .61-.61h-.322c0 .159-.129.288-.288.288v.322Zm-.61-.61c0 .337.273.61.61.61v-.322a.289.289 0 0 1-.289-.288h-.322Zm0-.482v.482h.321v-.482h-.322Zm-1.439-.04a.25.25 0 0 1 .25-.249v-.321a.571.571 0 0 0-.571.57h.321Zm0 .56v-.56h-.321v.56h.321Zm.25.25a.25.25 0 0 1-.25-.25h-.321c0 .316.255.572.57.572v-.322Zm.25-.25a.25.25 0 0 1-.25.25v.322a.571.571 0 0 0 .57-.571h-.32Zm0-.56v.56h.32v-.56h-.32Zm-.25-.249a.25.25 0 0 1 .25.25h.32a.571.571 0 0 0-.57-.571v.321Z"/></g><path fill="#fff" fill-rule="evenodd" d="M6.926 14.09a5.032 5.032 0 0 0 .435-2.395 5.01 5.01 0 0 1-.78 2.336c.114.024.23.044.345.06Z" clip-rule="evenodd"/><path fill="#fff" d="M9.52 7.248a.818.818 0 0 0 0 1.636V7.248Z"/><mask id="c" width="8" height="8" x="5" y="2" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" d="M12.178 2.499h-7.01v7.397h7.01V2.499Z"/><path fill="#000" fill-rule="evenodd" d="M9.557 3.12a11.62 11.62 0 0 1-1.189 6.47 2.725 2.725 0 0 1-.401-.183 11.628 11.628 0 0 0 1.06-6.471c.172.08.35.142.53.184Z" clip-rule="evenodd"/></mask><g mask="url(#c)"><path fill="#fff" d="m8.368 9.59.11.055-.05.096-.1-.036.04-.115Zm1.19-6.47.028-.118.084.02.009.086-.121.012Zm-1.59 6.287-.06.107-.1-.056.05-.104.11.053Zm1.06-6.471-.121.014-.027-.219.2.094-.052.11ZM8.26 9.535a11.498 11.498 0 0 0 1.176-6.402l.243-.025c.23 2.206-.158 4.48-1.202 6.537l-.217-.11ZM8.027 9.3c.124.069.252.127.383.174l-.083.23a2.839 2.839 0 0 1-.42-.191l.12-.213Zm1.122-6.38a11.75 11.75 0 0 1-1.072 6.54l-.22-.107a11.506 11.506 0 0 0 1.05-6.404l.242-.03Zm.38.318a2.842 2.842 0 0 1-.553-.193l.104-.22c.164.076.333.135.506.176l-.056.237Z"/></g><path fill="#fff" fill-rule="evenodd" d="m11.211 2.97-.17-.07-.051.176.158.046-.158-.046v.002l-.001.002-.003.01a1.717 1.717 0 0 0-.037.157 3.648 3.648 0 0 0-.063.414c-.03.324-.021.755.162 1.105a.107.107 0 0 1 .014.06c-.002.013-.005.017-.01.02-.211.155-.689.444-1.486.62a11.57 11.57 0 0 1-.018.173c.852-.18 1.367-.489 1.602-.66.09-.067.096-.19.044-.29-.24-.458-.147-1.106-.084-1.405.02-.1.038-.162.038-.162.026.01.052.018.077.023.483.082.993-.862 1.204-1.305a.197.197 0 0 0-.133-.281C11.06 1.264 5.27.132 4.371 4.47a.191.191 0 0 0 .05.176c.257.247 1.24 1.04 3.353 1.126a7.68 7.68 0 0 0 1.262-.047l.018-.17c-.37.05-.794.072-1.274.052-2.07-.083-3.014-.858-3.244-1.08l-.002-.006a.038.038 0 0 1 0-.017c.215-1.045.723-1.752 1.377-2.227.659-.477 1.476-.727 2.317-.836 1.684-.218 3.417.132 4.03.278.014.004.02.01.023.017.004.008.005.019-.001.033-.11.23-.298.589-.515.862-.11.137-.218.242-.319.301-.098.058-.171.064-.235.038Z" clip-rule="evenodd"/><mask id="d" width="7" height="7" x="3" y="8" maskUnits="userSpaceOnUse" style="mask-type:luminance"><path fill="#fff" fill-rule="evenodd" d="M8.026 10.726A4.425 4.425 0 0 1 9.39 9.75a2.728 2.728 0 0 1-2.22-1.012c.158.307.279.63.361.96a4.454 4.454 0 0 1-4.154 1.615 4.435 4.435 0 0 0 1.401 1.872c.884.69 1.947.995 2.985.938a7.227 7.227 0 0 0 .263-3.397Z" clip-rule="evenodd"/></mask><g mask="url(#d)"><path fill="#fff" d="m9.39 9.75-.006-.203.091.388-.084-.185Zm-1.364.976-.2.032-.016-.1.07-.072.146.14ZM7.17 8.738l-.18.093.338-.22-.158.127Zm.362.96.197-.048.024.097-.063.08-.158-.128Zm-4.155 1.615-.189.074-.13-.329.35.054-.03.2Zm4.387 2.81.193.063-.043.132-.139.008-.011-.203Zm1.711-4.188c-.478.22-.921.531-1.301.93l-.295-.28c.416-.437.902-.779 1.427-1.02l.17.37Zm-1.738-.924a2.525 2.525 0 0 0 1.647.536l.014.407a2.932 2.932 0 0 1-1.911-.623l.25-.32Zm-.41-.4c.119.145.255.28.41.4l-.25.32a2.952 2.952 0 0 1-.475-.464l.316-.257Zm.008 1.137a4.251 4.251 0 0 0-.346-.917l.362-.186c.165.321.291.659.378 1.005l-.394.098Zm-3.927 1.364a4.25 4.25 0 0 0 3.965-1.54l.317.254a4.657 4.657 0 0 1-4.344 1.688l.062-.402Zm1.245 2.233a4.638 4.638 0 0 1-1.465-1.958l.378-.149a4.231 4.231 0 0 0 1.337 1.787l-.25.32Zm3.122.98a4.64 4.64 0 0 1-3.122-.98l.25-.32c.844.66 1.858.95 2.85.895l.022.406Zm.452-3.632a7.43 7.43 0 0 1-.27 3.493l-.386-.126a7.024 7.024 0 0 0 .255-3.302l.401-.065Z"/></g></g></g><path stroke="#fff" stroke-width="1.2" d="m10 6.667.5-.334L12.5 5l2 1.333.5.334M12.5 11V5"/></svg>
diff --git a/crates/codestral/Cargo.toml b/crates/codestral/Cargo.toml
index 7da3bed75a9..0036e9df0f8 100644
--- a/crates/codestral/Cargo.toml
+++ b/crates/codestral/Cargo.toml
@@ -15,6 +15,7 @@ edit_prediction.workspace = true
futures.workspace = true
gpui.workspace = true
http_client.workspace = true
+icons.workspace = true
language.workspace = true
language_models.workspace = true
log.workspace = true
diff --git a/crates/codestral/src/codestral.rs b/crates/codestral/src/codestral.rs
index d5fc8d53b7e..8c1b0e65c07 100644
--- a/crates/codestral/src/codestral.rs
+++ b/crates/codestral/src/codestral.rs
@@ -1,9 +1,10 @@
use anyhow::Result;
use edit_prediction::cursor_excerpt;
-use edit_prediction_types::{EditPrediction, EditPredictionDelegate};
+use edit_prediction_types::{EditPrediction, EditPredictionDelegate, EditPredictionIconSet};
use futures::AsyncReadExt;
use gpui::{App, Context, Entity, Task};
use http_client::HttpClient;
+use icons::IconName;
use language::{
language_settings::all_language_settings, Anchor, Buffer, BufferSnapshot, EditPreview, ToPoint,
};
@@ -172,6 +173,10 @@ impl EditPredictionDelegate for CodestralEditPredictionDelegate {
true
}
+ fn icons(&self, _cx: &App) -> EditPredictionIconSet {
+ EditPredictionIconSet::new(IconName::AiMistral)
+ }
+
fn is_enabled(&self, _buffer: &Entity<Buffer>, _cursor_position: Anchor, cx: &App) -> bool {
Self::api_key(cx).is_some()
}
diff --git a/crates/copilot/Cargo.toml b/crates/copilot/Cargo.toml
index a07811cd2e3..6e5144ff634 100644
--- a/crates/copilot/Cargo.toml
+++ b/crates/copilot/Cargo.toml
@@ -32,6 +32,7 @@ fs.workspace = true
futures.workspace = true
gpui.workspace = true
edit_prediction_types.workspace = true
+icons.workspace = true
language.workspace = true
log.workspace = true
lsp.workspace = true
diff --git a/crates/copilot/src/copilot_edit_prediction_delegate.rs b/crates/copilot/src/copilot_edit_prediction_delegate.rs
index a8e8e231baa..6bc2da37f17 100644
--- a/crates/copilot/src/copilot_edit_prediction_delegate.rs
+++ b/crates/copilot/src/copilot_edit_prediction_delegate.rs
@@ -6,8 +6,11 @@ use crate::{
},
};
use anyhow::Result;
-use edit_prediction_types::{EditPrediction, EditPredictionDelegate, interpolate_edits};
+use edit_prediction_types::{
+ EditPrediction, EditPredictionDelegate, EditPredictionIconSet, interpolate_edits,
+};
use gpui::{App, Context, Entity, Task};
+use icons::IconName;
use language::{Anchor, Buffer, BufferSnapshot, EditPreview, OffsetRangeExt, ToPointUtf16};
use std::{ops::Range, sync::Arc, time::Duration};
@@ -50,6 +53,12 @@ impl EditPredictionDelegate for CopilotEditPredictionDelegate {
true
}
+ fn icons(&self, _cx: &App) -> EditPredictionIconSet {
+ EditPredictionIconSet::new(IconName::Copilot)
+ .with_disabled(IconName::CopilotDisabled)
+ .with_error(IconName::CopilotError)
+ }
+
fn is_refreshing(&self, _cx: &App) -> bool {
self.pending_refresh.is_some() && self.completion.is_none()
}
diff --git a/crates/edit_prediction/src/edit_prediction.rs b/crates/edit_prediction/src/edit_prediction.rs
index 4adfa2f5f62..f64e5ac4143 100644
--- a/crates/edit_prediction/src/edit_prediction.rs
+++ b/crates/edit_prediction/src/edit_prediction.rs
@@ -655,6 +655,29 @@ impl EditPredictionStore {
self.edit_prediction_model = model;
}
+ pub fn icons(&self) -> edit_prediction_types::EditPredictionIconSet {
+ use ui::IconName;
+ match self.edit_prediction_model {
+ EditPredictionModel::Sweep => {
+ edit_prediction_types::EditPredictionIconSet::new(IconName::SweepAi)
+ .with_disabled(IconName::SweepAiDisabled)
+ .with_up(IconName::SweepAiUp)
+ .with_down(IconName::SweepAiDown)
+ .with_error(IconName::SweepAiError)
+ }
+ EditPredictionModel::Mercury => {
+ edit_prediction_types::EditPredictionIconSet::new(IconName::Inception)
+ }
+ EditPredictionModel::Zeta1 | EditPredictionModel::Zeta2 { .. } => {
+ edit_prediction_types::EditPredictionIconSet::new(IconName::ZedPredict)
+ .with_disabled(IconName::ZedPredictDisabled)
+ .with_up(IconName::ZedPredictUp)
+ .with_down(IconName::ZedPredictDown)
+ .with_error(IconName::ZedPredictError)
+ }
+ }
+ }
+
pub fn has_sweep_api_token(&self, cx: &App) -> bool {
self.sweep_ai.api_token.read(cx).has_key()
}
diff --git a/crates/edit_prediction/src/zed_edit_prediction_delegate.rs b/crates/edit_prediction/src/zed_edit_prediction_delegate.rs
index b2a7f34c73b..f0936bc5f38 100644
--- a/crates/edit_prediction/src/zed_edit_prediction_delegate.rs
+++ b/crates/edit_prediction/src/zed_edit_prediction_delegate.rs
@@ -2,10 +2,13 @@ use std::{cmp, sync::Arc};
use client::{Client, UserStore};
use cloud_llm_client::EditPredictionRejectReason;
-use edit_prediction_types::{DataCollectionState, EditPredictionDelegate, SuggestionDisplayType};
+use edit_prediction_types::{
+ DataCollectionState, EditPredictionDelegate, EditPredictionIconSet, SuggestionDisplayType,
+};
use gpui::{App, Entity, prelude::*};
use language::{Buffer, ToPoint as _};
use project::Project;
+use ui::prelude::*;
use crate::{BufferEditPrediction, EditPredictionModel, EditPredictionStore};
@@ -58,6 +61,24 @@ impl EditPredictionDelegate for ZedEditPredictionDelegate {
true
}
+ fn icons(&self, cx: &App) -> EditPredictionIconSet {
+ match self.store.read(cx).edit_prediction_model {
+ EditPredictionModel::Sweep => EditPredictionIconSet::new(IconName::SweepAi)
+ .with_disabled(IconName::SweepAiDisabled)
+ .with_up(IconName::SweepAiUp)
+ .with_down(IconName::SweepAiDown)
+ .with_error(IconName::SweepAiError),
+ EditPredictionModel::Mercury => EditPredictionIconSet::new(IconName::Inception),
+ EditPredictionModel::Zeta1 | EditPredictionModel::Zeta2 { .. } => {
+ EditPredictionIconSet::new(IconName::ZedPredict)
+ .with_disabled(IconName::ZedPredictDisabled)
+ .with_up(IconName::ZedPredictUp)
+ .with_down(IconName::ZedPredictDown)
+ .with_error(IconName::ZedPredictError)
+ }
+ }
+ }
+
fn data_collection_state(&self, cx: &App) -> DataCollectionState {
if let Some(buffer) = &self.singleton_buffer
&& let Some(file) = buffer.read(cx).file()
diff --git a/crates/edit_prediction_types/Cargo.toml b/crates/edit_prediction_types/Cargo.toml
index 00a8577911a..4de0c9f62c5 100644
--- a/crates/edit_prediction_types/Cargo.toml
+++ b/crates/edit_prediction_types/Cargo.toml
@@ -14,5 +14,6 @@ path = "src/edit_prediction_types.rs"
[dependencies]
client.workspace = true
gpui.workspace = true
+icons.workspace = true
language.workspace = true
text.workspace = true
diff --git a/crates/edit_prediction_types/src/edit_prediction_types.rs b/crates/edit_prediction_types/src/edit_prediction_types.rs
index a077e43ff78..eff4cfcc3be 100644
--- a/crates/edit_prediction_types/src/edit_prediction_types.rs
+++ b/crates/edit_prediction_types/src/edit_prediction_types.rs
@@ -2,8 +2,50 @@ use std::{ops::Range, sync::Arc};
use client::EditPredictionUsage;
use gpui::{App, Context, Entity, SharedString};
+use icons::IconName;
use language::{Anchor, Buffer, OffsetRangeExt};
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub struct EditPredictionIconSet {
+ pub base: IconName,
+ pub disabled: IconName,
+ pub up: IconName,
+ pub down: IconName,
+ pub error: IconName,
+}
+
+impl EditPredictionIconSet {
+ pub fn new(base: IconName) -> Self {
+ Self {
+ base,
+ disabled: IconName::ZedPredictDisabled,
+ up: IconName::ZedPredictUp,
+ down: IconName::ZedPredictDown,
+ error: IconName::ZedPredictError,
+ }
+ }
+
+ pub fn with_disabled(mut self, disabled: IconName) -> Self {
+ self.disabled = disabled;
+ self
+ }
+
+ pub fn with_up(mut self, up: IconName) -> Self {
+ self.up = up;
+ self
+ }
+
+ pub fn with_down(mut self, down: IconName) -> Self {
+ self.down = down;
+ self
+ }
+
+ pub fn with_error(mut self, error: IconName) -> Self {
+ self.error = error;
+ self
+ }
+}
+
/// Represents a predicted cursor position after an edit is applied.
///
/// Since the cursor may be positioned inside newly inserted text that doesn't
@@ -110,6 +152,8 @@ pub trait EditPredictionDelegate: 'static + Sized {
true
}
+ fn icons(&self, cx: &App) -> EditPredictionIconSet;
+
fn data_collection_state(&self, _cx: &App) -> DataCollectionState {
DataCollectionState::Unsupported
}
@@ -156,6 +200,7 @@ pub trait EditPredictionDelegateHandle {
fn show_predictions_in_menu(&self) -> bool;
fn show_tab_accept_marker(&self) -> bool;
fn supports_jump_to_edit(&self) -> bool;
+ fn icons(&self, cx: &App) -> EditPredictionIconSet;
fn data_collection_state(&self, cx: &App) -> DataCollectionState;
fn usage(&self, cx: &App) -> Option<EditPredictionUsage>;
fn toggle_data_collection(&self, cx: &mut App);
@@ -202,6 +247,10 @@ where
T::supports_jump_to_edit()
}
+ fn icons(&self, cx: &App) -> EditPredictionIconSet {
+ self.read(cx).icons(cx)
+ }
+
fn data_collection_state(&self, cx: &App) -> DataCollectionState {
self.read(cx).data_collection_state(cx)
}
diff --git a/crates/edit_prediction_ui/src/edit_prediction_button.rs b/crates/edit_prediction_ui/src/edit_prediction_button.rs
index 94e408cf67e..f864940e082 100644
--- a/crates/edit_prediction_ui/src/edit_prediction_button.rs
+++ b/crates/edit_prediction_ui/src/edit_prediction_button.rs
@@ -308,6 +308,13 @@ impl Render for EditPredictionButton {
}
provider @ (EditPredictionProvider::Experimental(_) | EditPredictionProvider::Zed) => {
let enabled = self.editor_enabled.unwrap_or(true);
+ let icons = self
+ .edit_prediction_provider
+ .as_ref()
+ .map(|p| p.icons(cx))
+ .unwrap_or_else(|| {
+ edit_prediction_types::EditPredictionIconSet::new(IconName::ZedPredict)
+ });
let ep_icon;
let tooltip_meta;
@@ -317,19 +324,19 @@ impl Render for EditPredictionButton {
EditPredictionProvider::Experimental(
EXPERIMENTAL_SWEEP_EDIT_PREDICTION_PROVIDER_NAME,
) => {
- ep_icon = IconName::SweepAi;
+ missing_token = edit_prediction::EditPredictionStore::try_global(cx)
+ .is_some_and(|ep_store| !ep_store.read(cx).has_sweep_api_token(cx));
+ ep_icon = if enabled { icons.base } else { icons.disabled };
tooltip_meta = if missing_token {
"Missing API key for Sweep"
} else {
"Powered by Sweep"
};
- missing_token = edit_prediction::EditPredictionStore::try_global(cx)
- .is_some_and(|ep_store| !ep_store.read(cx).has_sweep_api_token(cx));
}
EditPredictionProvider::Experimental(
EXPERIMENTAL_MERCURY_EDIT_PREDICTION_PROVIDER_NAME,
) => {
- ep_icon = IconName::Inception;
+ ep_icon = if enabled { icons.base } else { icons.disabled };
missing_token = edit_prediction::EditPredictionStore::try_global(cx)
.is_some_and(|ep_store| !ep_store.read(cx).has_mercury_api_token(cx));
tooltip_meta = if missing_token {
@@ -339,11 +346,7 @@ impl Render for EditPredictionButton {
};
}
_ => {
- ep_icon = if enabled {
- IconName::ZedPredict
- } else {
- IconName::ZedPredictDisabled
- };
+ ep_icon = if enabled { icons.base } else { icons.disabled };
tooltip_meta = "Powered by Zeta"
}
};
@@ -849,10 +852,17 @@ impl EditPredictionButton {
);
if !self.editor_enabled.unwrap_or(true) {
+ let icons = self
+ .edit_prediction_provider
+ .as_ref()
+ .map(|p| p.icons(cx))
+ .unwrap_or_else(|| {
+ edit_prediction_types::EditPredictionIconSet::new(IconName::ZedPredict)
+ });
menu = menu.item(
ContextMenuEntry::new("This file is excluded.")
.disabled(true)
- .icon(IconName::ZedPredictDisabled)
+ .icon(icons.disabled)
.icon_size(IconSize::Small),
);
}
diff --git a/crates/edit_prediction_ui/src/rate_prediction_modal.rs b/crates/edit_prediction_ui/src/rate_prediction_modal.rs
index 936c51a2ae9..65ce7ec8761 100644
--- a/crates/edit_prediction_ui/src/rate_prediction_modal.rs
+++ b/crates/edit_prediction_ui/src/rate_prediction_modal.rs
@@ -839,20 +839,21 @@ impl Render for RatePredictionsModal {
.border_color(border_color)
.flex_shrink_0()
.overflow_hidden()
- .child(
+ .child({
+ let icons = self.ep_store.read(cx).icons();
h_flex()
.h_8()
.px_2()
.justify_between()
.border_b_1()
.border_color(border_color)
- .child(Icon::new(IconName::ZedPredict).size(IconSize::Small))
+ .child(Icon::new(icons.base).size(IconSize::Small))
.child(
Label::new("From most recent to oldest")
.color(Color::Muted)
.size(LabelSize::Small),
- ),
- )
+ )
+ })
.child(
div()
.id("completion_list")
diff --git a/crates/editor/src/edit_prediction_tests.rs b/crates/editor/src/edit_prediction_tests.rs
index 45cae0ef956..434f296f15a 100644
--- a/crates/editor/src/edit_prediction_tests.rs
+++ b/crates/editor/src/edit_prediction_tests.rs
@@ -1,9 +1,12 @@
-use edit_prediction_types::{EditPredictionDelegate, PredictedCursorPosition};
+use edit_prediction_types::{
+ EditPredictionDelegate, EditPredictionIconSet, PredictedCursorPosition,
+};
use gpui::{Entity, KeyBinding, Modifiers, prelude::*};
use indoc::indoc;
use multi_buffer::{Anchor, MultiBufferSnapshot, ToPoint};
use std::{ops::Range, sync::Arc};
use text::{Point, ToOffset};
+use ui::prelude::*;
use crate::{
AcceptEditPrediction, EditPrediction, MenuEditPredictionsPolicy, editor_tests::init_test,
@@ -589,6 +592,10 @@ impl EditPredictionDelegate for FakeEditPredictionDelegate {
true
}
+ fn icons(&self, _cx: &gpui::App) -> EditPredictionIconSet {
+ EditPredictionIconSet::new(IconName::ZedPredict)
+ }
+
fn is_enabled(
&self,
_buffer: &gpui::Entity<language::Buffer>,
@@ -656,6 +663,10 @@ impl EditPredictionDelegate for FakeNonZedEditPredictionDelegate {
false
}
+ fn icons(&self, _cx: &gpui::App) -> EditPredictionIconSet {
+ EditPredictionIconSet::new(IconName::ZedPredict)
+ }
+
fn is_enabled(
&self,
_buffer: &gpui::Entity<language::Buffer>,
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs
index 624383d8b9f..7d937866b89 100644
--- a/crates/editor/src/editor.rs
+++ b/crates/editor/src/editor.rs
@@ -9765,6 +9765,7 @@ impl Editor {
let keybind = self.render_edit_prediction_accept_keybind(window, cx);
let has_keybind = keybind.is_some();
+ let icons = Self::get_prediction_provider_icons(&self.edit_prediction_provider, cx);
h_flex()
.id("ep-line-popover")
@@ -9783,7 +9784,7 @@ impl Editor {
el.bg(status_colors.error_background)
.border_color(status_colors.error.opacity(0.6))
.pl_2()
- .child(Icon::new(IconName::ZedPredictError).color(Color::Error))
+ .child(Icon::new(icons.error).color(Color::Error))
.cursor_default()
.hoverable_tooltip(move |_window, cx| {
cx.new(|_| MissingEditPredictionKeybindingTooltip).into()
@@ -9823,6 +9824,7 @@ impl Editor {
) -> Stateful<Div> {
let keybind = self.render_edit_prediction_accept_keybind(window, cx);
let has_keybind = keybind.is_some();
+ let icons = Self::get_prediction_provider_icons(&self.edit_prediction_provider, cx);
let file_name = snapshot
.file()
@@ -9845,7 +9847,7 @@ impl Editor {
el.bg(status_colors.error_background)
.border_color(status_colors.error.opacity(0.6))
.pl_2()
- .child(Icon::new(IconName::ZedPredictError).color(Color::Error))
+ .child(Icon::new(icons.error).color(Color::Error))
.cursor_default()
.hoverable_tooltip(move |_window, cx| {
cx.new(|_| MissingEditPredictionKeybindingTooltip).into()
@@ -9887,16 +9889,13 @@ impl Editor {
let editor_bg_color = cx.theme().colors().editor_background;
editor_bg_color.blend(accent_color.opacity(0.6))
}
- fn get_prediction_provider_icon_name(
+ fn get_prediction_provider_icons(
provider: &Option<RegisteredEditPredictionDelegate>,
- ) -> IconName {
+ cx: &App,
+ ) -> edit_prediction_types::EditPredictionIconSet {
match provider {
- Some(provider) => match provider.provider.name() {
- "copilot" => IconName::Copilot,
- "supermaven" => IconName::Supermaven,
- _ => IconName::ZedPredict,
- },
- None => IconName::ZedPredict,
+ Some(provider) => provider.provider.icons(cx),
+ None => edit_prediction_types::EditPredictionIconSet::new(IconName::ZedPredict),
}
}
@@ -9911,7 +9910,7 @@ impl Editor {
cx: &mut Context<Editor>,
) -> Option<AnyElement> {
let provider = self.edit_prediction_provider.as_ref()?;
- let provider_icon = Self::get_prediction_provider_icon_name(&self.edit_prediction_provider);
+ let icons = Self::get_prediction_provider_icons(&self.edit_prediction_provider, cx);
let is_refreshing = provider.provider.is_refreshing(cx);
@@ -9941,16 +9940,16 @@ impl Editor {
use text::ToPoint as _;
if target.text_anchor.to_point(snapshot).row > cursor_point.row
{
- Icon::new(IconName::ZedPredictDown)
+ Icon::new(icons.down)
} else {
- Icon::new(IconName::ZedPredictUp)
+ Icon::new(icons.up)
}
}
EditPrediction::MoveOutside { .. } => {
// TODO [zeta2] custom icon for external jump?
- Icon::new(provider_icon)
+ Icon::new(icons.base)
}
- EditPrediction::Edit { .. } => Icon::new(provider_icon),
+ EditPrediction::Edit { .. } => Icon::new(icons.base),
}))
.child(
h_flex()
@@ -10017,11 +10016,11 @@ impl Editor {
cx,
)?,
- None => pending_completion_container(provider_icon)
+ None => pending_completion_container(icons.base)
.child(Label::new("...").size(LabelSize::Small)),
},
- None => pending_completion_container(provider_icon)
+ None => pending_completion_container(icons.base)
.child(Label::new("...").size(LabelSize::Small)),
};
@@ -10131,6 +10130,8 @@ impl Editor {
.map(|provider| provider.provider.supports_jump_to_edit())
.unwrap_or(true);
+ let icons = Self::get_prediction_provider_icons(&self.edit_prediction_provider, cx);
+
match &completion.completion {
EditPrediction::MoveWithin {
target, snapshot, ..
@@ -10146,9 +10147,9 @@ impl Editor {
.flex_1()
.child(
if target.text_anchor.to_point(snapshot).row > cursor_point.row {
- Icon::new(IconName::ZedPredictDown)
+ Icon::new(icons.down)
} else {
- Icon::new(IconName::ZedPredictUp)
+ Icon::new(icons.up)
},
)
.child(Label::new("Jump to Edit")),
@@ -10164,7 +10165,7 @@ impl Editor {
.px_2()
.gap_2()
.flex_1()
- .child(Icon::new(IconName::ZedPredict))
+ .child(Icon::new(icons.base))
.child(Label::new(format!("Jump to {file_name}"))),
)
}
@@ -10197,9 +10198,7 @@ impl Editor {
render_relative_row_jump("", cursor_point.row, first_edit_row)
.into_any_element()
} else {
- let icon_name =
- Editor::get_prediction_provider_icon_name(&self.edit_prediction_provider);
- Icon::new(icon_name).into_any_element()
+ Icon::new(icons.base).into_any_element()
};
Some(
diff --git a/crates/icons/src/icons.rs b/crates/icons/src/icons.rs
index 93866f62589..f716fcc1c60 100644
--- a/crates/icons/src/icons.rs
+++ b/crates/icons/src/icons.rs
@@ -222,6 +222,10 @@ pub enum IconName {
SupermavenInit,
SwatchBook,
SweepAi,
+ SweepAiDisabled,
+ SweepAiDown,
+ SweepAiError,
+ SweepAiUp,
Tab,
Terminal,
TerminalAlt,
diff --git a/crates/supermaven/src/supermaven_edit_prediction_delegate.rs b/crates/supermaven/src/supermaven_edit_prediction_delegate.rs
index 4c3216f2e28..f97fe9edfe0 100644
--- a/crates/supermaven/src/supermaven_edit_prediction_delegate.rs
+++ b/crates/supermaven/src/supermaven_edit_prediction_delegate.rs
@@ -1,6 +1,6 @@
use crate::{Supermaven, SupermavenCompletionStateId};
use anyhow::Result;
-use edit_prediction_types::{EditPrediction, EditPredictionDelegate};
+use edit_prediction_types::{EditPrediction, EditPredictionDelegate, EditPredictionIconSet};
use futures::StreamExt as _;
use gpui::{App, Context, Entity, EntityId, Task};
use language::{Anchor, Buffer, BufferSnapshot};
@@ -11,6 +11,7 @@ use std::{
time::Duration,
};
use text::{ToOffset, ToPoint};
+use ui::prelude::*;
use unicode_segmentation::UnicodeSegmentation;
pub const DEBOUNCE_TIMEOUT: Duration = Duration::from_millis(75);
@@ -126,6 +127,12 @@ impl EditPredictionDelegate for SupermavenEditPredictionDelegate {
false
}
+ fn icons(&self, _cx: &App) -> EditPredictionIconSet {
+ EditPredictionIconSet::new(IconName::Supermaven)
+ .with_disabled(IconName::SupermavenDisabled)
+ .with_error(IconName::SupermavenError)
+ }
+
fn is_enabled(&self, _buffer: &Entity<Buffer>, _cursor_position: Anchor, cx: &App) -> bool {
self.supermaven.read(cx).is_enabled()
}