feat(chat): storage size check and chat history cleanup #10527
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please post in #team-cody-clients if you need help getting this CI check to pass. | |
# Worst-case: feel free to disable this workflow here https://github.com/sourcegraph/cody/actions/workflows/agent-bindings.yml | |
name: agent-bindings | |
on: | |
workflow_dispatch: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
kotlin: | |
if: github.repository == 'sourcegraph/cody' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check if only Kotlin files changed | |
id: check-kt-only | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const { data: files } = await github.rest.pulls.listFiles({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: context.issue.number | |
}); | |
const changedFiles = files.map(file => file.filename); | |
const onlyKotlinChanged = changedFiles.every(file => file.endsWith('.kt')); | |
core.setOutput('only-kt-files', onlyKotlinChanged.toString()); | |
if (onlyKotlinChanged) { | |
core.info('Only Kotlin files changed - skipping bindings checks'); | |
} | |
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # SECURITY: pin third-party action hashes | |
id: pnpm-install | |
with: | |
version: 8.6.7 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm generate-agent-kotlin-bindings | |
if: steps.check-kt-only.outputs['only-kt-files'] != 'true' | |
- run: ./agent/scripts/error-if-diff.sh | |
if: steps.check-kt-only.outputs['only-kt-files'] != 'true' | |
- run: ./agent/scripts/compile-bindings-if-diff.sh | |
if: steps.check-kt-only.outputs['only-kt-files'] != 'true' |