Code AI platform with Code Search & Cody
Go to file
Felix Kling 8d8456fd91
search: Add search context support to experimental search input (#46417)
The current version of the search input prototype does not include a separate input element for the search context. Instead the search context is treated like any other filter, except we style it slightly differently (see video).

This diff does a couple of things:

- Adds support for value completion for the context: filter.
- Renders context: filters differently from other filters in the input.
- Refactors the whole suggestions implementation so that it will be easier to add new suggestion sources in the future.
- Introduces a custom version of the built-in placeholder extension that allows us to overwrite when/how the placeholder should be visible.

This diff also fixes an issue where we did not update the selected search context correctly when it wasn't present in a query.

I also had to update @codemirror/view and @codemirror/state to fix an issue with rendering decorations. This doesn't seem to have any effect on the current search input. Unfortunately it didn't fix all the issues (which I also point out in the video).

NOTE: Keep in mind that this is still a prototype and we are still verifying our approach. You might not agree with how search contexts work in this version, but that should not be the focus of the code review here.
2023-01-18 14:16:13 +01:00
.aspect [SG-46115] - Merge the search-ui package into the branded package (#46197) 2023-01-11 18:27:19 +01:00
.buildkite web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
.github Update release protector (#46609) 2023-01-17 23:34:54 +01:00
.vscode web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
client search: Add search context support to experimental search input (#46417) 2023-01-18 14:16:13 +01:00
cmd Fix Account Security Page (#45901) 2023-01-18 12:36:18 +01:00
dev codeintel: Revert codeintel-qa bucket until SCIP tests are relevant (#46578) 2023-01-17 15:54:04 +00:00
doc fix links (#46626) 2023-01-18 12:08:43 +01:00
docker-images Upgrade node-exporter (#46553) 2023-01-17 11:13:38 -03:00
enterprise Fix Account Security Page (#45901) 2023-01-18 12:36:18 +01:00
internal Fix Account Security Page (#45901) 2023-01-18 12:36:18 +01:00
lib codeintel: Fix reference moniker translation (#46391) 2023-01-12 13:57:50 -07:00
migrations database: add outbound webhook tables (#46007) 2023-01-17 16:08:40 -08:00
monitoring monitoring: fix indentation of otel-collector descriptions (#46448) 2023-01-17 07:58:05 -08:00
schema database: add outbound webhook tables (#46007) 2023-01-17 16:08:40 -08:00
third-party-licenses all: entirely remove minio support (#45311) 2022-12-06 18:02:43 -07:00
ui/assets remove extension registry UI and related GraphQL API (#45891) 2022-12-22 00:10:56 -08:00
.bazelignore [SG-46115] - Merge the search-ui package into the branded package (#46197) 2023-01-11 18:27:19 +01:00
.bazelrc Initial Bazel Setup (#45052) 2022-12-02 12:57:14 +01:00
.bazelversion Initial Bazel Setup (#45052) 2022-12-02 12:57:14 +01:00
.browserslistrc web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
.dockerignore web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
.editorconfig chore: Add .lua to editorconfig. (#44267) 2022-11-11 15:25:32 +08:00
.eslintignore vscode: create integration test harness (#33921) 2022-04-22 09:54:35 -04:00
.eslintrc.js [SG-46115] - Merge the search-ui package into the branded package (#46197) 2023-01-11 18:27:19 +01:00
.gitattributes chore: Fix pattern in .gitattributes to match mock files. (#44331) 2022-11-14 10:45:28 +08:00
.gitignore web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
.golangci-warn.yml Update linter script: re-add go "unused" linter but do not fail builds (#46039) 2023-01-06 12:24:44 +01:00
.golangci.yml disable flaky nolintlint linter (#46358) 2023-01-11 21:01:01 -06:00
.graphqlrc.yml Support multiple GraphQL schema files (#20077) 2021-04-19 14:35:49 +02:00
.hadolint.yaml bump comby version to 1.7.1 (#35830) 2022-05-20 20:12:01 -07:00
.mailmap mailmap: update replacements for Joe (#29614) 2022-01-12 10:56:56 +08:00
.mocharc.js Revert "regression-tests: update custom mocha reporter to exit rather… (#41542) 2022-09-08 19:48:01 +00:00
.npmrc web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
.percy.yml Update browser extention installation detection logic on web (#32449) 2022-03-14 23:29:39 +06:00
.prettierignore web: prettier ignore lock file (#46420) 2023-01-15 17:46:37 -08:00
.stylelintignore web: named Webpack chunks (#39481) 2022-07-28 20:22:05 -07:00
.stylelintrc.json web: drop bootstrap depenedency (#41401) 2022-09-07 03:11:26 -07:00
.tool-versions web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
.trivyignore ci: ignore benign CVE-2021-43816 in prometheus (#31069) 2022-02-11 16:49:10 +00:00
babel.config.js Add pagination to saved searches pages (#45705) 2023-01-05 21:11:42 +05:30
BUILD.bazel bazel - build client/common + client/extension-api-types (#45689) 2022-12-15 11:58:45 +01:00
CHANGELOG.md changelog: cut sourcegraph@4.4.0 (#46607) 2023-01-17 19:18:23 +00:00
CONTRIBUTING.md Docs: Fix docs page link in main CONTRIBUTING.md (#45160) 2022-12-05 14:57:45 +01:00
doc.go Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
flake.lock nix: switch to unpinned nixpkgs (#46482) 2023-01-16 13:10:38 +02:00
flake.nix nix: switch to unpinned nixpkgs (#46482) 2023-01-16 13:10:38 +02:00
gen.go chore: Update go-mockgen (#44305) 2022-11-11 19:24:00 +00:00
go.mod gomod: update go-sqlite3 to fix CVE-2022-35737 (#46623) 2023-01-18 10:32:24 +02:00
go.sum gomod: update go-sqlite3 to fix CVE-2022-35737 (#46623) 2023-01-18 10:32:24 +02:00
graphql-schema-linter.config.js Support multiple GraphQL schema files (#20077) 2021-04-19 14:35:49 +02:00
gulpfile.js web: drop legacy GraphQL schema generator (#45945) 2022-12-25 18:10:20 -08:00
jest.config.base.js web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
jest.config.js tests: use glob for jest projects field (#29681) 2022-01-13 01:11:52 -08:00
LICENSE update licensing language (#25620) 2021-10-04 15:40:59 +01:00
LICENSE.apache Move all client code into client/ folder (#14480) 2020-10-07 22:23:53 +02:00
LICENSE.enterprise clarify license (#2543) 2019-03-03 16:39:46 +08:00
lighthouserc.js web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
mockgen.temp.yaml database: add outbound webhook tables (#46007) 2023-01-17 16:08:40 -08:00
mockgen.test.yaml insights: run a backfill based on an insight's repository criteria (#45779) 2022-12-19 11:52:51 +01:00
mockgen.yaml mocks: Reorganize mock definitions into multiple files (#36967) 2022-06-27 20:59:16 +00:00
package.json search: Add search context support to experimental search input (#46417) 2023-01-18 14:16:13 +01:00
pnpm-lock.yaml search: Add search context support to experimental search input (#46417) 2023-01-18 14:16:13 +01:00
pnpm-workspace.yaml web: sync TS project refenreces (#46407) 2023-01-16 18:55:10 -08:00
postcss.config.js extensibility: add featured extensions to registry (#21665) 2021-06-10 13:55:20 -04:00
prettier.config.js Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
README.md docs/update add GCE custom image deployment type (#42911) 2022-10-21 10:23:57 -07:00
renovate.json chore: add test plans to bot and release tool PRs (#31351) 2022-02-22 07:53:25 -08:00
SECURITY.md consolidate security policy (#7906) 2020-01-21 10:03:11 -08:00
sg.config.yaml prometheus: disable web.enable-lifecycle and web.enable-admin-api outside of dev (#46393) 2023-01-12 17:44:57 -08:00
shell.nix nix: swap out yarn for pnpm (#46484) 2023-01-16 13:10:13 +02:00
svgo.config.js Performance: Optimize static SVG assets with SVGO (#26285) 2021-10-27 15:27:36 +01:00
tsconfig.all.json [SG-46115] - Merge the search-ui package into the branded package (#46197) 2023-01-11 18:27:19 +01:00
tsconfig.bazel.json bazel - build client/common + client/extension-api-types (#45689) 2022-12-15 11:58:45 +01:00
tsconfig.eslint.json web: upgrade prettier to the latest version to support TS satisfies operator (#45400) 2022-12-08 02:37:23 -08:00
tsconfig.json web: sync TS project refenreces (#46407) 2023-01-16 18:55:10 -08:00
WORKSPACE web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00

Sourcegraph 4.0

DocsContributingTwitter

Build status Scorecard Latest release Discord Contributors


Understand, fix, and automate across your codebase with Sourcegraph's code intelligence platform

 


4.0 Features

  • Understand usage and search structure with high-level aggregations of search results
  • A faster, simpler search experience
  • Configure precise code navigation for 9 languages (Ruby, Rust, Go, Java, Scala, Kotlin, Python, TypeScript, JavaScript) in a matter of minutes with auto-indexing
  • Your favorite extensions are now available by default
  • Quickly access answers within your codebase with a revamped reference panel

🏗️ High-leverage ways to improve your entire codebase

  • Make changes across all of your codebase at enterprise scale with server-side Batch Changes (beta)
    • Run large-scale or resource-intensive batch changes without clogging your local machine
    • Run large batch changes quickly by distributing them across an autoscaled pool of compute instances
    • Get a better debugging experience with the streaming of logs directly into Sourcegraph.

☁️ Dedicated Sourcegraph Cloud instances for enterprise

  • Sourcegraph Cloud now offers dedicated, single-tenant instances of Sourcegraph

📈 Advanced admin capabilities

  • Save time upgrading to Sourcegraph 4.0 with multi-version upgrades
  • View usage and measure the value of our platform with new and enhanced in-product analytics
  • Uncover developer time saved using Browser and IDE extensions
  • Easily export traces using OpenTelemetry
  • Quickly see the status on your repository and permissions syncing
  • Measure precise code navigation coverage with an enhanced analytics dashboard

Deploy Sourcegraph

Self-hosted

Local machine

Development

Refer to the Developing Sourcegraph guide to get started.

Documentation

The doc directory has additional documentation for developing and understanding Sourcegraph:

License

This repository contains both OSS-licensed and non-OSS-licensed files. We maintain one repository rather than two separate repositories mainly for development convenience.

All files in the enterprise and client/web/src/enterprise fall under LICENSE.enterprise.

The remaining files fall under the Apache 2 license. Sourcegraph OSS is built only from the Apache-licensed files in this repository.