{"id":47763610,"url":"https://github.com/source-academy/autocomplete","last_synced_at":"2026-04-03T05:56:43.988Z","repository":{"id":347284392,"uuid":"1193434754","full_name":"source-academy/autocomplete","owner":"source-academy","description":"Plugin for autocomplete","archived":false,"fork":false,"pushed_at":"2026-03-27T10:55:51.000Z","size":197,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T19:51:53.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/source-academy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-27T08:10:56.000Z","updated_at":"2026-03-27T10:45:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/source-academy/autocomplete","commit_stats":null,"previous_names":["source-academy/autocomplete"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/source-academy/autocomplete","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fautocomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fautocomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fautocomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fautocomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/source-academy","download_url":"https://codeload.github.com/source-academy/autocomplete/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fautocomplete/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31337713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T04:42:29.251Z","status":"ssl_error","status_checked_at":"2026-04-03T04:42:12.667Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T05:56:43.385Z","updated_at":"2026-04-03T05:56:43.982Z","avatar_url":"https://github.com/source-academy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Autocomplete Plugin\n\n## Using the package\n\nFor most circumstances, using the package directly would be fine\n\n```bash\nyarn add @sourceacademy/autocomplete@github:source-academy/autocomplete#0.0.1\n```\n\nThen, directly import them from your code\n\n```ts\nimport { BaseAutoCompleteWebPlugin } from '@sourceacademy/autocomplete';\n\nexport class AutoCompletePlugin extends BaseAutoCompleteWebPlugin {\n    (...)\n}\n```\n\nIf you need to set up a development build, clone the repository\n\n```bash\ngit clone https://github.com/source-academy/autocomplete\ncd autocomplete\n```\n\nRun `yarn build` (or `yarn watch` for development, where it creates incremental builds). If there are no problems, the files `dist/index.mjs` and `dist/index.cjs` will be generated.\nThis is the file that will be used to run the plugin on the host (the frontend) and the runner.\n\nTo use the new package in another project, go to the project directory, then use\n\n```bash\nyarn link path/to/autocomplete\n```\n\n## Contents of this package\n\nThe project uses Yarn v4 with [PnP](https://yarnpkg.com/features/pnp) out of the box.\n**To generate the Typescript SDK if you're using VSCode, run `yarn dlx @yarnpkg/sdks vscode`. Otherwise, types won't show up properly**. For other editors, refer to the [Yarn documentation](https://yarnpkg.com/getting-started/editor-sdks).\n\nIt is already configured with [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/). Linting is available through `yarn lint` and formatting through `yarn format`. **Linting and formatting changes are enforced in CI builds, in line with other SA repos**. A minimal testing framework is provided with `jest`. Testing is performed using `yarn test`.\n\n_Note: For more information regarding the terminology and systems used in this package, refer to the [Conductor](https://github.com/source-academy/conductor) repository. It'll make the paragraphs below a lot more coherent_\n\nThe repo consists of two abstract plugins, `BaseAutoCompleteWebPlugin` in `src/web.ts` which is meant to be run on the host's side (the frontend, most likely), as well as the `BaseAutoCompleteRunnerPlugin` in `src/runner.ts` meant to be run on the runner's side (the thread running the evaluator).\n\nThe plugins subscribe to two channels\n\n1. An autocomplete channel. The usual flow is that every time an edit is made in the frontend, the web plugin sends an `AutoCompleteRequest` to the runner plugin via `webplugin.autocomplete(...)`. The runner plugin receives it and sends an `AutoCompleteResponse` back.\n2. A syntax highlighting channel. The runner plugin periodically sends syntax highlighting information using `SyntaxHighlightMessage` till it receives an acknowledgement `SyntaxHighlightAck`. Alternatively, the web plugin can send a `SyntaxHighlightRequest` instead of waiting for the periodic messages.\n\nThe Typescript files are bundled using [Rollup](https://rollupjs.org/), and are transpiled into the `dist` folder (at `dist/index.mjs` and `dist/index.cjs`, as well as the type definitions at `dist/index.d.ts`).\n\n## Documentation\n\nThis repository has been configured to automatically build documentation and deploy it to GitHub Pages using Typedoc upon pushing to the `main` branch on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsource-academy%2Fautocomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsource-academy%2Fautocomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsource-academy%2Fautocomplete/lists"}