hunk.code_window:     - name: Build
         if: ${{ inputs.target == 'x86_64-unknown-linux-gnu' }}
         uses: addnab/docker-run-action@v3
         with:
           image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
           options: --user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build
           run: >-
             export CC=x86_64-unknown-linux-gnu-gcc &&
             export CC_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-gcc &&
             yarn nx build @affine/native --target ${{ inputs.target }} &&
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep
hunk.after_edit:         options: --user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build -e NX_CLOUD_ACCESS_TOKEN=${{ inputs.nx_token }}
  
hunk.file_path: .github/actions/build-rust/action.yml
hunk.type: replace
file: import { useAFFiNEI18N } from '@affine/i18n/hooks';
  import { SidebarIcon } from '@blocksuite/icons';
  import { useAtom } from 'jotai';
  
  import { IconButton, Tooltip } from '../../../';
  import { sidebarButtonStyle } from '../index.css';
  import { appSidebarOpenAtom } from '../index.jotai';
  
  export const SidebarSwitch = () => {
    const [open, setOpen] = useAtom(appSidebarOpenAtom);
    const t = useAFFiNEI18N();
    const tooltipContent = open ? t['Collapse sidebar']() : t['Expand sidebar']();
    const collapseKeyboardShortcuts =
      environment.isBrowser && environment.isMacOs ? ' ⌘+/' : ' Ctrl+/';
  
    return (
      <Tooltip
        content={tooltipContent + ' ' + collapseKeyboardShortcuts}
        placement="right"
        zIndex={1000}
      >
        <IconButton
          data-testid={`app-sidebar-arrow-button-${open ? 'collapse' : 'expand'}`}
          className={sidebarButtonStyle}
          onClick={() => setOpen(open => !open)}
        >
          <SidebarIcon width={24} height={24} />
        </IconButton>
      </Tooltip>
    );
  };
  