feat: support select field as tool output (#2798)

* feat: support select field as tool output

* defaultOutput
This commit is contained in:
papapatrick
2024-09-26 14:37:06 +08:00
committed by GitHub
parent 1cf76ee7df
commit cb6fe9d0da
13 changed files with 323 additions and 46 deletions

View File

@@ -1,13 +1,16 @@
<svg viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="36" height="36" fill="url(#paint0_linear_7399_1292)"/>
<path d="M18.5151 18.0001C18.5151 17.4478 18.9629 17.0001 19.5151 17.0001H27.8021C28.3543 17.0001 28.8021 17.4478 28.8021 18.0001C28.8021 18.5524 28.3543 19.0001 27.8021 19.0001H19.5151C18.9629 19.0001 18.5151 18.5524 18.5151 18.0001Z" fill="white"/>
<path d="M24.5558 14.606C24.9464 14.2155 25.5795 14.2155 25.97 14.606L28.5156 17.1516C28.9062 17.5421 28.9062 18.1753 28.5156 18.5658C28.1251 18.9564 27.4919 18.9564 27.1014 18.5658L24.5558 16.0202C24.1653 15.6297 24.1653 14.9966 24.5558 14.606Z" fill="white"/>
<path d="M24.5558 21.2528C24.1653 20.8623 24.1653 20.2291 24.5558 19.8386L27.1014 17.293C27.4919 16.9025 28.1251 16.9025 28.5156 17.293C28.9061 17.6835 28.9061 18.3167 28.5156 18.7072L25.97 21.2528C25.5795 21.6433 24.9463 21.6433 24.5558 21.2528Z" fill="white"/>
<path d="M12.2499 8C10.593 8 9.24988 9.34314 9.24988 11V25.0001C9.24988 26.6569 10.593 28.0001 12.2499 28.0001H19.397C21.0539 28.0001 22.397 26.6569 22.397 25.0001V21.8676L17.8665 21.2666C17.1885 21.1767 16.6775 20.611 16.6517 19.9327H16.6506V16.0674H16.6517C16.6775 15.3891 17.1885 14.8234 17.8665 14.7335L22.397 14.1325V11C22.397 9.34315 21.0539 8 19.397 8H12.2499Z" fill="white"/>
<svg viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg">
<rect width="30" height="30" fill="url(#paint0_linear_10924_8146)"/>
<g clip-path="url(#clip0_10924_8146)" transform="scale(1.2)">
<path d="M9.31163 7.3964C8.79127 7.75359 8.7958 8.48769 9.24209 8.93399C9.59913 9.29103 10.1743 9.28053 10.6006 9.00994C11.0319 8.7302 11.5121 8.54282 12.0182 8.44215C12.825 8.28166 13.6613 8.30403 14.4213 8.67884C15.1814 8.99305 15.831 9.52676 16.288 10.2108C16.745 10.8947 16.989 11.6989 16.989 12.5215C16.989 13.3442 16.745 14.1483 16.288 14.8323C15.831 15.5163 15.1814 16.0494 14.4213 16.3042C13.6613 16.6791 12.825 16.7614 12.0182 16.6009C11.5121 16.5003 11.0319 16.3069 10.6006 16.0331C10.1743 15.7626 9.59913 15.7521 9.24209 16.1091C8.79579 16.5554 8.79126 17.2895 9.31163 17.6467C10.003 18.1213 10.7867 18.4533 11.6169 18.6185C12.8228 18.8583 14.0727 18.7352 15.2086 18.2647C16.3445 17.7942 17.3153 16.9975 17.9984 15.9752C18.6815 14.9529 19.046 13.751 19.046 12.5215C19.046 11.2921 18.6815 10.0902 17.9984 9.0679C17.3153 8.04562 16.3445 7.24885 15.2086 6.77835C14.0727 6.30785 12.8228 6.18474 11.6169 6.4246C10.7867 6.58974 10.003 6.92182 9.31163 7.3964Z" fill="white"/>
<path d="M12.8296 15.5548C11.5721 15.5548 10.4932 14.7895 10.0335 13.6991H6.1316C5.48124 13.6991 4.95401 13.1719 4.95401 12.5215C4.95401 11.8712 5.48124 11.3439 6.1316 11.3439H10.0335C10.4932 10.2530 11.5721 9.4883 12.8296 9.4883C14.5049 9.4883 15.8629 10.8463 15.8629 12.5215C15.8629 14.1968 14.5049 15.5548 12.8296 15.5548Z" fill="white"/>
</g>
<defs>
<linearGradient id="paint0_linear_7399_1292" x1="18" y1="0" x2="5.5" y2="33" gradientUnits="userSpaceOnUse">
<stop stop-color="#8DD56B"/>
<stop offset="1" stop-color="#65C144"/>
<linearGradient id="paint0_linear_10924_8146" x1="12" y1="0.521542" x2="3.66669" y2="22.5215" gradientUnits="userSpaceOnUse">
<stop stop-color="#68C0FF"/>
<stop offset="1" stop-color="#52A2FF"/>
</linearGradient>
<clipPath id="clip0_10924_8146">
<rect width="16" height="16" fill="white" transform="translate(4.00003 4.52154)"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,14 @@
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="20" height="20" rx="4" fill="url(#paint0_linear_10924_8305)"/>
<path d="M9.30803 5.55551H10.8223C11.3132 5.55551 11.7112 5.95348 11.7112 6.4444V6.63244H12.7777C12.7927 6.63244 12.8075 6.63244 12.8223 6.63244V6.4444C12.8223 5.33983 11.9269 4.4444 10.8223 4.4444H9.30803C8.20346 4.4444 7.30803 5.33983 7.30803 6.4444V6.63244H8.41914V6.4444C8.41914 5.95348 8.81711 5.55551 9.30803 5.55551Z" fill="white"/>
<path d="M15.7977 9.03205H4.20217C4.20987 8.37132 4.24505 7.97945 4.40589 7.66379C4.58698 7.30837 4.87595 7.01941 5.23136 6.83832C5.63542 6.63244 6.16436 6.63244 7.22224 6.63244H12.7777C13.8356 6.63244 14.3645 6.63244 14.7685 6.83832C15.124 7.01941 15.4129 7.30837 15.594 7.66379C15.7549 7.97945 15.79 8.37132 15.7977 9.03205Z" fill="white"/>
<path d="M11.4642 10.0209H15.7999V12.5333C15.7999 13.5912 15.7999 14.1202 15.594 14.5242C15.4129 14.8796 15.124 15.1686 14.7685 15.3497C14.3645 15.5556 13.8356 15.5556 12.7777 15.5556H7.22223C6.16436 15.5556 5.63542 15.5556 5.23136 15.3497C4.87595 15.1686 4.58698 14.8796 4.40589 14.5242C4.20001 14.1202 4.20001 13.5912 4.20001 12.5333V10.0209H8.53574V11.8459C8.53574 12.03 8.68498 12.1793 8.86907 12.1793H11.1308C11.3149 12.1793 11.4642 12.03 11.4642 11.8459V10.0209Z" fill="white"/>
<path d="M9.42463 10.0209H10.5753V11.2904H9.42463V10.0209Z" fill="white"/>
<defs>
<linearGradient id="paint0_linear_10924_8305" x1="10" y1="0" x2="3.05556" y2="18.3333" gradientUnits="userSpaceOnUse">
<stop stop-color="#5BA7FF"/>
<stop offset="1" stop-color="#4383FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,7 @@
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="20" height="20" rx="4" fill="#C4CBD7"/>
<path d="M9.30803 5.55548H10.8223C11.3132 5.55548 11.7112 5.95345 11.7112 6.44437V6.63241H12.7777C12.7927 6.63241 12.8075 6.63241 12.8223 6.63241V6.44437C12.8223 5.3398 11.9269 4.44437 10.8223 4.44437H9.30803C8.20346 4.44437 7.30803 5.3398 7.30803 6.44437V6.63241H8.41914V6.44437C8.41914 5.95345 8.81711 5.55548 9.30803 5.55548Z" fill="white"/>
<path d="M15.7977 9.03202H4.20217C4.20987 8.37129 4.24505 7.97942 4.40589 7.66376C4.58698 7.30834 4.87595 7.01938 5.23136 6.83829C5.63542 6.63241 6.16436 6.63241 7.22224 6.63241H12.7777C13.8356 6.63241 14.3645 6.63241 14.7685 6.83829C15.124 7.01938 15.4129 7.30834 15.594 7.66376C15.7549 7.97942 15.79 8.37129 15.7977 9.03202Z" fill="white"/>
<path d="M11.4642 10.0209H15.7999V12.5333C15.7999 13.5912 15.7999 14.1201 15.594 14.5242C15.4129 14.8796 15.124 15.1686 14.7685 15.3497C14.3645 15.5555 13.8356 15.5555 12.7777 15.5555H7.22223C6.16436 15.5555 5.63542 15.5555 5.23136 15.3497C4.87595 15.1686 4.58698 14.8796 4.40589 14.5242C4.20001 14.1201 4.20001 13.5912 4.20001 12.5333V10.0209H8.53574V11.8459C8.53574 12.03 8.68498 12.1792 8.86907 12.1792H11.1308C11.3149 12.1792 11.4642 12.03 11.4642 11.8459V10.0209Z" fill="white"/>
<path d="M9.42463 10.0209H10.5753V11.2903H9.42463V10.0209Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,10 +1,13 @@
<svg viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="36" height="36" fill="url(#paint0_linear_7252_16832)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.2 8.87964C8.43269 8.87964 7 10.3123 7 12.0796V23.9205C7 25.6878 8.43269 27.1205 10.2 27.1205H25.7815C27.5488 27.1205 28.9815 25.6878 28.9815 23.9205V12.0796C28.9815 10.3123 27.5488 8.87964 25.7815 8.87964H10.2ZM11.0333 14.0886C11.0333 13.5363 11.4811 13.0886 12.0333 13.0886H15.0231C15.5754 13.0886 16.0231 13.5363 16.0231 14.0886C16.0231 14.6409 15.5754 15.0886 15.0231 15.0886H14.4282V20.9326H15.0231C15.5754 20.9326 16.0231 21.3803 16.0231 21.9326C16.0231 22.4849 15.5754 22.9326 15.0231 22.9326H12.0333C11.4811 22.9326 11.0333 22.4849 11.0333 21.9326C11.0333 21.3803 11.4811 20.9326 12.0333 20.9326H12.6282L12.6282 15.0886H12.0333C11.4811 15.0886 11.0333 14.6409 11.0333 14.0886ZM19.2645 21.2343C18.874 20.8437 18.2408 20.8437 17.8503 21.2343C17.4598 21.6248 17.4598 22.2579 17.8503 22.6485L17.8574 22.6555C18.2479 23.0461 18.881 23.0461 19.2716 22.6555C19.6621 22.265 19.6621 21.6318 19.2716 21.2413L19.2645 21.2343ZM22.7852 21.2343C22.3947 20.8437 21.7616 20.8437 21.371 21.2343C20.9805 21.6248 20.9805 22.2579 21.371 22.6485L21.3781 22.6555C21.7686 23.0461 22.4018 23.0461 22.7923 22.6555C23.1828 22.265 23.1828 21.6318 22.7923 21.2413L22.7852 21.2343Z" fill="white"/>
<svg viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="36" height="36" fill="url(#paint0_linear_10921_7976)"/>
<g clip-path="url(#clip0_10924_8146)" transform="scale(1.5)">
<path d="M14.6884 7.3964C15.2088 7.75359 15.2043 8.48769 14.758 8.93399C14.4009 9.29103 13.8257 9.28053 13.3994 9.00994C12.9682 8.7362 12.488 8.54282 11.9819 8.44215C11.175 8.28166 10.3387 8.36403 9.57873 8.67884C8.81871 8.99365 8.16912 9.52676 7.71209 10.2108C7.25506 10.8947 7.01112 11.6989 7.01112 12.5215C7.01112 13.3442 7.25506 14.1483 7.71209 14.8323C8.16912 15.5163 8.81871 16.0494 9.57873 16.3642C10.3387 16.6791 11.175 16.7614 11.9819 16.6009C12.488 16.5003 12.9682 16.3669 13.3994 16.0331C13.8257 15.7626 14.4009 15.7521 14.758 16.1091C15.2043 16.5554 15.2088 17.2895 14.6884 17.6467C13.997 18.1213 13.2134 18.4533 12.3832 18.6185C11.1773 18.8583 9.92742 18.7352 8.79152 18.2647C7.65562 17.7942 6.68476 16.9975 6.00169 15.9752C5.31863 14.9529 4.95404 13.751 4.95404 12.5215C4.95404 11.2921 5.31862 10.0902 6.00169 9.0679C6.68476 8.04562 7.65562 7.24885 8.79152 6.77835C9.92742 6.36785 11.1773 6.18474 12.3832 6.4246C13.2134 6.58974 13.997 6.92182 14.6884 7.3964Z" fill="white"/>
<path d="M11.1704 15.5548C12.428 15.5548 13.5069 14.7895 13.9666 13.6991H17.8685C18.5188 13.6991 19.0461 13.1719 19.0461 12.5215C19.0461 11.8712 18.5188 11.3439 17.8685 11.3439H13.9666C13.5069 10.2536 12.428 9.4883 11.1704 9.4883C9.49521 9.4883 8.13718 10.8463 8.13718 12.5215C8.13718 14.1968 9.49521 15.5548 11.1704 15.5548Z" fill="white"/>
</g>
<defs>
<linearGradient id="paint0_linear_7252_16832" x1="18" y1="0" x2="5.5" y2="33" gradientUnits="userSpaceOnUse">
<stop stop-color="#769CFF"/>
<stop offset="1" stop-color="#4980FF"/>
<linearGradient id="paint0_linear_10921_7976" x1="12" y1="0.521542" x2="3.66667" y2="22.5215" gradientUnits="userSpaceOnUse">
<stop stop-color="#68C0FF"/>
<stop offset="1" stop-color="#52A2FF"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB