Skip to content

Commit

Permalink
feat(presets): add animation to generating of ai (#7015)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Sun committed May 12, 2024
1 parent 1f7aecb commit 89fb3be
Show file tree
Hide file tree
Showing 13 changed files with 454 additions and 684 deletions.
182 changes: 0 additions & 182 deletions packages/blocks/src/_common/icons/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,34 +57,6 @@ export const AIStopIcon = html`<svg
</defs>
</svg>`;

export const LanguageIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M7.50014 1.875C7.84532 1.875 8.12514 2.15482 8.12514 2.5V3.54167H10.6143C10.6216 3.54154 10.629 3.54154 10.6364 3.54167H12.5001C12.8453 3.54167 13.1251 3.82149 13.1251 4.16667C13.1251 4.51184 12.8453 4.79167 12.5001 4.79167H11.1458C10.6639 7.16518 9.64438 9.34282 8.22006 11.1922C8.5043 11.4886 8.80705 11.7614 9.12514 12C9.40128 12.2071 9.45724 12.5989 9.25014 12.875C9.04303 13.1511 8.65128 13.2071 8.37514 13C8.03723 12.7466 7.71615 12.4624 7.41408 12.1563C6.10818 13.5972 4.5372 14.7931 2.77828 15.6672C2.46917 15.8208 2.09406 15.6947 1.94044 15.3856C1.78683 15.0765 1.91288 14.7014 2.22199 14.5478C3.88561 13.721 5.36619 12.5816 6.58695 11.2065C5.71216 10.0729 5.07111 8.78956 4.74375 7.67633C4.64637 7.34517 4.83588 6.99777 5.16703 6.90039C5.49819 6.80301 5.84559 6.99252 5.94297 7.32367C6.2088 8.22765 6.71769 9.26651 7.3989 10.2054C8.57216 8.61889 9.42665 6.78272 9.86797 4.79167H2.9168C2.57163 4.79167 2.2918 4.51184 2.2918 4.16667C2.2918 3.82149 2.57163 3.54167 2.9168 3.54167H6.87514V2.5C6.87514 2.15482 7.15496 1.875 7.50014 1.875ZM13.3335 8.54167C13.5702 8.54167 13.7866 8.67542 13.8925 8.88716L16.8035 14.7093C16.8076 14.7169 16.8115 14.7247 16.8152 14.7326L18.0592 17.2205C18.2135 17.5292 18.0884 17.9046 17.7796 18.059C17.4709 18.2134 17.0955 18.0882 16.9411 17.7795L15.8639 15.625H10.8031L9.72582 17.7795C9.57145 18.0882 9.19603 18.2134 8.8873 18.059C8.57856 17.9046 8.45342 17.5292 8.60779 17.2205L9.85174 14.7326C9.85547 14.7247 9.85936 14.7169 9.86341 14.7093L12.7745 8.88716C12.8803 8.67542 13.0967 8.54167 13.3335 8.54167ZM11.4281 14.375H15.2389L13.3335 10.5642L11.4281 14.375Z"
/>
</svg> `;

export const ImproveWritingIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M8.54167 2.5C8.54167 2.15482 8.26184 1.875 7.91667 1.875C7.57149 1.875 7.29167 2.15482 7.29167 2.5V5C7.29167 5.34518 7.57149 5.625 7.91667 5.625C8.26184 5.625 8.54167 5.34518 8.54167 5V2.5ZM8.54167 10.8333C8.54167 10.4882 8.26184 10.2083 7.91667 10.2083C7.57149 10.2083 7.29167 10.4882 7.29167 10.8333V13.3333C7.29167 13.6785 7.57149 13.9583 7.91667 13.9583C8.26184 13.9583 8.54167 13.6785 8.54167 13.3333V10.8333ZM5.625 7.91667C5.625 8.26184 5.34518 8.54167 5 8.54167H2.5C2.15482 8.54167 1.875 8.26184 1.875 7.91667C1.875 7.57149 2.15482 7.29167 2.5 7.29167H5C5.34518 7.29167 5.625 7.57149 5.625 7.91667ZM13.3333 8.54167C13.6785 8.54167 13.9583 8.26184 13.9583 7.91667C13.9583 7.57149 13.6785 7.29167 13.3333 7.29167H10.8333C10.4882 7.29167 10.2083 7.57149 10.2083 7.91667C10.2083 8.26184 10.4882 8.54167 10.8333 8.54167H13.3333ZM6.29623 6.29623C6.05215 6.54031 5.65642 6.54031 5.41235 6.29623L3.64458 4.52846C3.4005 4.28439 3.4005 3.88866 3.64458 3.64458C3.88866 3.4005 4.28439 3.4005 4.52846 3.64458L6.29623 5.41235C6.54031 5.65642 6.54031 6.05215 6.29623 6.29623ZM15.8081 16.6919C16.0521 16.936 16.4479 16.936 16.6919 16.6919C16.936 16.4479 16.936 16.0521 16.6919 15.8081L10.421 9.53712C10.1769 9.29304 9.7812 9.29304 9.53712 9.53712C9.29304 9.7812 9.29304 10.1769 9.53712 10.421L15.8081 16.6919ZM6.29623 9.5371C6.54031 9.78118 6.54031 10.1769 6.29623 10.421L4.52846 12.1888C4.28439 12.4328 3.88866 12.4328 3.64458 12.1888C3.4005 11.9447 3.4005 11.5489 3.64458 11.3049L5.41235 9.5371C5.65642 9.29303 6.05215 9.29303 6.29623 9.5371ZM12.1888 4.52845C12.4328 4.28437 12.4328 3.88864 12.1888 3.64457C11.9447 3.40049 11.549 3.40049 11.3049 3.64457L9.53712 5.41233C9.29304 5.65641 9.29304 6.05214 9.53712 6.29622C9.7812 6.54029 10.1769 6.54029 10.421 6.29622L12.1888 4.52845Z"
/>
</svg> `;

export const AIDoneIcon = html`<svg
width="20"
height="20"
Expand All @@ -99,132 +71,6 @@ export const AIDoneIcon = html`<svg
/>
</svg> `;

export const ShorterIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M4.1665 4.79163C3.82133 4.79163 3.5415 5.07145 3.5415 5.41663C3.5415 5.7618 3.82133 6.04163 4.1665 6.04163H15.8332C16.1783 6.04163 16.4582 5.7618 16.4582 5.41663C16.4582 5.07145 16.1783 4.79163 15.8332 4.79163H4.1665ZM4.1665 7.70829C3.82133 7.70829 3.5415 7.98811 3.5415 8.33329C3.5415 8.67847 3.82133 8.95829 4.1665 8.95829H9.99984C10.345 8.95829 10.6248 8.67847 10.6248 8.33329C10.6248 7.98811 10.345 7.70829 9.99984 7.70829H4.1665Z"
/>
</svg> `;

export const LongerIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M4.1665 4.79163C3.82133 4.79163 3.5415 5.07145 3.5415 5.41663C3.5415 5.7618 3.82133 6.04163 4.1665 6.04163H15.8332C16.1783 6.04163 16.4582 5.7618 16.4582 5.41663C16.4582 5.07145 16.1783 4.79163 15.8332 4.79163H4.1665ZM4.1665 7.70829C3.82133 7.70829 3.5415 7.98811 3.5415 8.33329C3.5415 8.67847 3.82133 8.95829 4.1665 8.95829H15.8332C16.1783 8.95829 16.4582 8.67847 16.4582 8.33329C16.4582 7.98811 16.1783 7.70829 15.8332 7.70829H4.1665ZM3.5415 11.25C3.5415 10.9048 3.82133 10.625 4.1665 10.625H15.8332C16.1783 10.625 16.4582 10.9048 16.4582 11.25C16.4582 11.5951 16.1783 11.875 15.8332 11.875H4.1665C3.82133 11.875 3.5415 11.5951 3.5415 11.25ZM4.1665 13.5416C3.82133 13.5416 3.5415 13.8214 3.5415 14.1666C3.5415 14.5118 3.82133 14.7916 4.1665 14.7916H9.99984C10.345 14.7916 10.6248 14.5118 10.6248 14.1666C10.6248 13.8214 10.345 13.5416 9.99984 13.5416H4.1665Z"
/>
</svg> `;

export const ToneIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M7.6411 7.08838L6.71487 9.4857C6.60938 9.75873 6.34683 9.93875 6.05413 9.93875H3.3335C2.98832 9.93875 2.7085 9.65893 2.7085 9.31375C2.7085 8.96857 2.98832 8.68875 3.3335 8.68875H5.68272L7.09896 5.02319C7.34911 4.37576 8.28457 4.43706 8.44809 5.11159L10.0805 11.8452L11.5785 7.1197C11.7512 6.57492 12.4648 6.44842 12.8142 6.90064L14.196 8.68875H16.6668C17.012 8.68875 17.2918 8.96857 17.2918 9.31375C17.2918 9.65893 17.012 9.93875 16.6668 9.93875H13.93C13.7106 9.93875 13.5036 9.83711 13.3695 9.66353L12.4575 8.48336L10.6861 14.0712C10.4695 14.7545 9.49134 14.7206 9.32248 14.024L7.6411 7.08838Z"
/>
</svg> `;

export const ExplainIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M4.1665 4.375C3.82133 4.375 3.5415 4.65482 3.5415 5V15C3.5415 15.3452 3.82133 15.625 4.1665 15.625H5.83317C6.17835 15.625 6.45817 15.3452 6.45817 15C6.45817 14.6548 6.17835 14.375 5.83317 14.375H4.7915V5.625H5.83317C6.17835 5.625 6.45817 5.34518 6.45817 5C6.45817 4.65482 6.17835 4.375 5.83317 4.375H4.1665ZM15.8332 4.375C16.1783 4.375 16.4582 4.65482 16.4582 5V15C16.4582 15.3452 16.1783 15.625 15.8332 15.625H14.1665C13.8213 15.625 13.5415 15.3452 13.5415 15C13.5415 14.6548 13.8213 14.375 14.1665 14.375H15.2082V5.625H14.1665C13.8213 5.625 13.5415 5.34518 13.5415 5C13.5415 4.65482 13.8213 4.375 14.1665 4.375H15.8332Z"
/>
</svg> `;

export const AIPenIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M16.0654 3.93417C15.5409 3.41078 14.6902 3.41078 14.1658 3.93417L13.4285 4.67003L15.3263 6.56414L16.0654 5.82654C16.5891 5.30384 16.5891 4.45687 16.0654 3.93417ZM14.4416 7.44716L12.5437 5.55304L3.5415 14.5375V16.4583H5.41262L14.4416 7.44716ZM13.2828 3.04941C14.2951 2.03903 15.936 2.03903 16.9484 3.04941C17.9614 4.06047 17.9614 5.70024 16.9484 6.7113L6.11265 17.5257C5.99547 17.6427 5.83669 17.7083 5.67114 17.7083H2.9165C2.57133 17.7083 2.2915 17.4285 2.2915 17.0833V14.2783C2.2915 14.1123 2.35752 13.9532 2.475 13.8359L13.2828 3.04941Z"
/>
</svg> `;

export const ChatWithAIIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M3.12926 6.59386C2.2839 5.82997 2.79173 4.375 3.97096 4.375H15.8351C16.8185 4.375 17.3998 5.44049 16.9328 6.27292L11.1139 16.6458C10.543 17.6636 9.04423 17.4269 8.78738 16.306L7.45823 10.5057L3.12926 6.59386ZM8.73556 10.4835L10.0058 16.0268C10.0075 16.0342 10.0092 16.0381 10.01 16.0396C10.011 16.0401 10.013 16.041 10.0161 16.0414C10.0172 16.0416 10.0182 16.0417 10.0191 16.0417C10.0202 16.0401 10.0218 16.0377 10.0238 16.0343L15.26 6.70001L8.73556 10.4835ZM14.622 5.625H3.97096C3.96952 5.625 3.96831 5.62504 3.96732 5.6251C3.96581 5.62713 3.96365 5.63059 3.96169 5.63585C3.95772 5.64646 3.95838 5.65425 3.95884 5.65639C3.95897 5.65699 3.95903 5.65711 3.95919 5.65738L3.9592 5.6574C3.95926 5.6575 3.961 5.66071 3.96732 5.66642L8.10424 9.40467L14.622 5.625Z"
/>
</svg> `;

export const AISearchIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M3.125 7.91667C3.125 5.2703 5.2703 3.125 7.91667 3.125C10.563 3.125 12.7083 5.2703 12.7083 7.91667C12.7083 10.563 10.563 12.7083 7.91667 12.7083C5.2703 12.7083 3.125 10.563 3.125 7.91667ZM7.91667 1.875C4.57995 1.875 1.875 4.57995 1.875 7.91667C1.875 11.2534 4.57995 13.9583 7.91667 13.9583C9.35991 13.9583 10.685 13.4523 11.724 12.6079L16.2247 17.1086C16.4688 17.3527 16.8645 17.3527 17.1086 17.1086C17.3527 16.8645 17.3527 16.4688 17.1086 16.2247L12.6079 11.724C13.4523 10.685 13.9583 9.35991 13.9583 7.91667C13.9583 4.57995 11.2534 1.875 7.91667 1.875Z"
/>
</svg> `;

export const MakeItRealIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M1.89506 9.08909C1.36098 9.73568 1.85634 10.7079 2.69338 10.6559L5.70784 10.4685L7.3281 13.0174C7.77801 13.7251 8.85573 13.5545 9.06491 12.7423L9.63712 10.5207L15.8083 16.6918C16.0524 16.9359 16.4481 16.9359 16.6922 16.6918C16.9362 16.4477 16.9362 16.052 16.6922 15.8079L10.5208 9.63654L12.743 9.06417C13.5552 8.855 13.7259 7.77728 13.0181 7.32737L10.4692 5.7071L10.6566 2.69265C10.7086 1.85562 9.73642 1.36024 9.08982 1.89433L6.76121 3.81777L3.9522 2.70805C3.17221 2.39991 2.40064 3.17147 2.70878 3.95147L3.8185 6.76048L1.89506 9.08909ZM5.80215 9.21024L3.28715 9.36656L4.8919 7.42377C5.11419 7.15466 5.17258 6.78598 5.04433 6.46135L4.11848 4.11775L6.46208 5.0436C6.78671 5.17185 7.15539 5.11346 7.4245 4.89117L9.36729 3.28642L9.21097 5.80142C9.18931 6.14979 9.35878 6.48238 9.65335 6.66963L11.7799 8.02144L9.33969 8.64995C9.00168 8.737 8.73774 9.00095 8.65068 9.33896L8.02217 11.7792L6.67036 9.65261C6.48312 9.35805 6.15052 9.18858 5.80215 9.21024Z"
/>
</svg> `;

export const TagIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M3.80314 6.22236C3.85186 4.90697 4.90697 3.85186 6.22236 3.80314L10.0611 3.66097C10.3298 3.65102 10.5905 3.75339 10.7807 3.94351L16.3203 9.48317C16.6979 9.86077 16.6979 10.473 16.3203 10.8506L10.8506 16.3203C10.473 16.6979 9.86076 16.6979 9.48316 16.3203L3.94351 10.7807C3.75339 10.5905 3.65101 10.3298 3.66097 10.0612L3.80314 6.22236ZM6.17942 2.64364C4.25692 2.71484 2.71484 4.25693 2.64364 6.17942L2.50146 10.0182C2.47957 10.6093 2.70479 11.1829 3.12305 11.6011L8.6627 17.1408C9.49343 17.9715 10.8403 17.9715 11.671 17.1408L17.1408 11.6711C17.9715 10.8403 17.9715 9.49344 17.1408 8.66271L11.6011 3.12305C11.1828 2.70479 10.6093 2.47957 10.0182 2.50146L6.17942 2.64364ZM6.88504 6.88505C7.18713 6.58296 7.18713 6.09319 6.88504 5.7911C6.58296 5.48902 6.09319 5.48902 5.7911 5.7911C5.48902 6.09319 5.48902 6.58296 5.7911 6.88505C6.09318 7.18713 6.58296 7.18713 6.88504 6.88505Z"
/>
</svg> `;

export const EnterIcon = html`<svg
width="20"
height="20"
Expand Down Expand Up @@ -252,31 +98,3 @@ export const ArrowRightIcon = html`<svg
d="M7.05838 5.39143C6.81431 5.63551 6.81431 6.03124 7.05838 6.27532L10.7831 10L7.05838 13.7248C6.81431 13.9688 6.81431 14.3646 7.05838 14.6087C7.30246 14.8527 7.69819 14.8527 7.94227 14.6087L12.1089 10.442C12.353 10.1979 12.353 9.80218 12.1089 9.5581L7.94227 5.39143C7.69819 5.14735 7.30246 5.14735 7.05838 5.39143Z"
/>
</svg> `;

export const DiscardIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M9.16667 1.87512C7.90101 1.87512 6.875 2.90114 6.875 4.16679V5.12504H3.33333C2.94213 5.12504 2.625 5.44217 2.625 5.83337C2.625 6.22458 2.94213 6.54171 3.33333 6.54171H3.59066L4.26602 15.9967C4.35168 17.196 5.34957 18.1251 6.55186 18.1251H13.4481C14.6504 18.1251 15.6483 17.196 15.734 15.9967L16.4093 6.54171H16.6667C17.0579 6.54171 17.375 6.22458 17.375 5.83337C17.375 5.44217 17.0579 5.12504 16.6667 5.12504H13.125V4.16679C13.125 2.90114 12.099 1.87512 10.8333 1.87512H9.16667ZM11.875 5.12504V4.16679C11.875 3.59149 11.4086 3.12512 10.8333 3.12512H9.16667C8.59137 3.12512 8.125 3.59149 8.125 4.16679V5.12504H11.875ZM15.1562 6.54171H4.84385L5.51285 15.9077C5.55178 16.4528 6.00537 16.8751 6.55186 16.8751H13.4481C13.9946 16.8751 14.4482 16.4528 14.4872 15.9077L15.1562 6.54171ZM8.95833 9.16679C8.95833 8.82161 8.67851 8.54179 8.33333 8.54179C7.98815 8.54179 7.70833 8.82161 7.70833 9.16679V14.1668C7.70833 14.512 7.98815 14.7918 8.33333 14.7918C8.67851 14.7918 8.95833 14.512 8.95833 14.1668V9.16679ZM11.6667 8.54179C12.0118 8.54179 12.2917 8.82161 12.2917 9.16679V14.1668C12.2917 14.512 12.0118 14.7918 11.6667 14.7918C11.3215 14.7918 11.0417 14.512 11.0417 14.1668V9.16679C11.0417 8.82161 11.3215 8.54179 11.6667 8.54179Z"
/>
</svg>`;

export const SelectionIcon = html`<svg
width="20"
height="20"
viewBox="0 0 20 20"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M5.00016 2.70837C3.73451 2.70837 2.7085 3.73439 2.7085 5.00004V15C2.7085 16.2657 3.73451 17.2917 5.00016 17.2917H9.16683C9.51201 17.2917 9.79183 17.0119 9.79183 16.6667C9.79183 16.3215 9.51201 16.0417 9.16683 16.0417H5.00016C4.42487 16.0417 3.9585 15.5753 3.9585 15V5.00004C3.9585 4.42474 4.42487 3.95837 5.00016 3.95837H15.0002C15.5755 3.95837 16.0418 4.42474 16.0418 5.00004V9.16671C16.0418 9.51189 16.3217 9.79171 16.6668 9.79171C17.012 9.79171 17.2918 9.51189 17.2918 9.16671V5.00004C17.2918 3.73439 16.2658 2.70837 15.0002 2.70837H5.00016ZM11.616 11.076C11.2776 10.9436 10.9438 11.2775 11.0762 11.6159L13.54 17.9123C13.6801 18.2704 14.1891 18.2637 14.3198 17.9021L15.2048 15.4548C15.2469 15.3384 15.3385 15.2467 15.4549 15.2046L17.9023 14.3197C18.2639 14.1889 18.2705 13.68 17.9124 13.5398L11.616 11.076Z"
/>
</svg>`;
2 changes: 2 additions & 0 deletions packages/blocks/src/root-block/widgets/ai-panel/ai-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { customElement, property } from 'lit/decorators.js';
import { choose } from 'lit/directives/choose.js';

import type { AIError } from '../../../_common/components/index.js';
import { AIStarIconWithAnimation } from '../../../_common/icons/ai.js';
import { stopPropagation } from '../../../_common/utils/event.js';
import { getPageRootByElement } from '../../../_common/utils/query.js';
import { PageRootService } from '../../page/page-root-service.js';
Expand Down Expand Up @@ -484,6 +485,7 @@ export class AffineAIPanelWidget extends WidgetElement {
`
: nothing}
<ai-panel-generating
.icon=${config.generatingIcon ?? AIStarIconWithAnimation}
.stopGenerating=${this.stopGenerating}
></ai-panel-generating>
`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { WithDisposable } from '@blocksuite/block-std';
import { baseTheme } from '@toeverything/theme';
import { css, html, LitElement, unsafeCSS } from 'lit';
import { css, html, LitElement, type TemplateResult, unsafeCSS } from 'lit';
import { customElement, property } from 'lit/decorators.js';

import {
AIStarIconWithAnimation,
AIStopIcon,
} from '../../../../../_common/icons/ai.js';
import { AIStopIcon } from '../../../../../_common/icons/ai.js';

@customElement('ai-panel-generating')
export class AIPanelGenerating extends WithDisposable(LitElement) {
Expand Down Expand Up @@ -68,13 +65,16 @@ export class AIPanelGenerating extends WithDisposable(LitElement) {
}
`;

@property({ attribute: false })
icon!: TemplateResult<1>;

@property({ attribute: false })
stopGenerating!: () => void;

override render() {
return html`
<div class="generating-tip">
<div class="left">${AIStarIconWithAnimation}</div>
<div class="left">${this.icon}</div>
<div class="text">AI is generating...</div>
<div @click=${this.stopGenerating} class="right">
<span class="stop-icon">${AIStopIcon}</span>
Expand Down
2 changes: 2 additions & 0 deletions packages/blocks/src/root-block/widgets/ai-panel/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export interface AffineAIPanelWidgetConfig {
discardCallback?: () => void;

copy?: CopyConfig;

generatingIcon: TemplateResult<1>;
}

export type AffineAIPanelState =
Expand Down
Loading

0 comments on commit 89fb3be

Please sign in to comment.