gitlab-cloud-connector 1.12.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ad05b8bdbe28bb01760e2778f4fd95949d4ab927ee76a78b0177aafea43d912
4
- data.tar.gz: b2405278b9f29f0c3d696c44f2aeb0d3f06578e8c3af28189a33e3d998e5a626
3
+ metadata.gz: cb83b610b630d8bec2117b6c5473856274b4cf19824a9b96c729808647b8c55c
4
+ data.tar.gz: f95a96e59789f000725c2b9ef87fb166ce17d23082f6460125d3bde5d45f7f75
5
5
  SHA512:
6
- metadata.gz: 36c31411737f12736f99cc95bda8e3eae88eec3dc13f27727b5654b2cdd4df79d40aa86abcb1c4f2a6b7f5d500f2508a64bb610cbece045fbd479f29ffbb68de
7
- data.tar.gz: f0b345b64f19ffed81dd9a28ea67ea66d63759a762b353cb49762d3b947804eb940ffd60eb13559869b1169de0ee74c4fff0b8ee1aebad353f2cfad3f752841b
6
+ metadata.gz: c8c12b5077dbbe30f6ebb538f5a90c4ad867418200f1502088cd53a276a8469ad3778c532ccfb8336b2745abc7a0d48abbcab9b599f65b77f30bac66457289fd
7
+ data.tar.gz: cc05305427fa886ce5e96662dfc6b3d50a67b1180fbe75aff0b3732a29dc8a07127b222b864b2cf531db4c4c0f92785e0e6e06f95ba22d9490a7c39357194e13
data/README.md CHANGED
@@ -61,14 +61,14 @@ duo_chat.backend_services.map(&:jwt_aud)
61
61
  ## Contributing
62
62
 
63
63
  ### Test your changes locally
64
-
65
- To test changes to the Ruby gem in your environment, you need to source gem contents from you local dir:
66
64
 
67
- 1. add a `path` attribute to the `gem` definition in the `Gemfile:
65
+ To test changes to the Ruby gem in your environment, you need to source gem contents from you local dir:
68
66
 
69
- ```ruby
70
- gem "gitlab-cloud-connector", "~> 1.5", require: 'gitlab/cloud_connector', feature_category: :cloud_connector, path: '<path to gitlab-cloud-connector folder on your machine>/src/ruby/'
71
- ```
67
+ 1. Set `path` in `Gemfile` to point to the library project source:
68
+
69
+ ```ruby
70
+ gem "gitlab-cloud-connector", "~> 1.5", require: 'gitlab/cloud_connector', feature_category: :cloud_connector, path: '/path/to/gitlab-cloud-connector/src/ruby/'
71
+ ```
72
72
 
73
73
  1. Run `bundle install` to apply the changes
74
74
 
@@ -7,6 +7,7 @@ unit_primitives:
7
7
  - ask_epic
8
8
  - ask_issue
9
9
  - ask_merge_request
10
+ - codebase_search
10
11
  - documentation_search
11
12
  - duo_chat
12
13
  - explain_code
@@ -8,6 +8,7 @@ unit_primitives:
8
8
  - ask_epic
9
9
  - ask_issue
10
10
  - ask_merge_request
11
+ - codebase_search
11
12
  - complete_code
12
13
  - generate_code
13
14
  - documentation_search
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: codebase_search
3
+ description: Perform semantic search on a GitLab repository for a given query.
4
+ cut_off_date: 2024-10-17T00:00:00+00:00
5
+ group: group::code creation
6
+ feature_category: duo_chat
7
+ documentation_url: "" # To be added: https://gitlab.com/gitlab-org/gitlab/-/issues/537573
8
+ milestone: "18.1"
9
+ introduced_by_url: "https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector/-/merge_requests/149"
10
+ unit_primitive_issue_url: https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector/-/issues/72
11
+ backend_services:
12
+ - ai_gateway
13
+ add_ons:
14
+ - duo_pro
15
+ - duo_enterprise
16
+ - duo_amazon_q
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: generate_embeddings_codebase
3
+ description: >
4
+ Generates embeddings for Chat with Codebase feature.
5
+ This unit primitive serves two purposes:
6
+ 1. System requests (majority): Used to populate a vector store for search functionality. These requests do not have an associated user.
7
+ 2. User requests (minority): Generated when Chat with Codebase feature is used. These requests include user.
8
+ group: group::code suggestions
9
+ feature_category: code_suggestions
10
+ unit_primitive_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/538567
11
+ introduced_by_url: https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector/-/merge_requests/146
12
+ cut_off_date: 2024-02-15T00:00:00+00:00
13
+ backend_services:
14
+ - ai_gateway
15
+ add_ons:
16
+ - duo_pro
17
+ - duo_enterprise
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  name: semantic_search_issue
3
- description: Perform semantic search on gitlab issues for a given query.
3
+ description: >
4
+ Performs semantic search on GitLab work items for a given query.
5
+ This unit primitive serves two purposes:
6
+ 1. System requests (majority): Used to populate a vector store for search functionality. These requests do not have an associated user or namespace IDs.
7
+ 2. User requests (minority): Generated when a work item search is performed using the Global Search feature for enabled projects. These requests include user and namespace IDs.
4
8
  group: group::global search
5
9
  feature_category: global_search
6
10
  backend_services:
@@ -11,7 +11,7 @@ module Gitlab
11
11
  InvalidConfigError = Class.new(StandardError)
12
12
 
13
13
  class << self
14
- attr_writer :config_dir, :memoize_data
14
+ attr_writer :config_dir
15
15
  attr_reader :override_config
16
16
 
17
17
  def config_dir
@@ -32,12 +32,6 @@ module Gitlab
32
32
  @override_config = value
33
33
  end
34
34
 
35
- def memoize_data?
36
- return @memoize_data unless @memoize_data.nil?
37
-
38
- data_loader_class == DEFAULT_DATA_LOADER_CLASS
39
- end
40
-
41
35
  def configure
42
36
  yield self if block_given?
43
37
  end
@@ -23,17 +23,13 @@ module Gitlab
23
23
  end
24
24
 
25
25
  def all
26
- if Configuration.memoize_data?
27
- @all ||= data_loader.load!
28
- else
29
- data_loader.load!
30
- end
26
+ data_loader.load!
31
27
  end
32
28
 
33
29
  private
34
30
 
35
31
  def data_loader
36
- Configuration.data_loader_class.new(self)
32
+ @data_loader ||= Configuration.data_loader_class.new(self)
37
33
  end
38
34
  end
39
35
 
@@ -11,11 +11,15 @@ module Gitlab
11
11
  include Overridable
12
12
 
13
13
  def load!
14
- Dir.glob(data_files_path).map { |file| load_model_from_file(file) }
14
+ load_data_from_files
15
15
  end
16
16
 
17
17
  private
18
18
 
19
+ def load_data_from_files
20
+ @load_data_from_files ||= Dir.glob(data_files_path).map { |file| load_model_from_file(file) }
21
+ end
22
+
19
23
  def data_files_path
20
24
  File.join(CloudConnector::Configuration.config_dir, model_class.model_name.tableize, '*.yml')
21
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module CloudConnector
5
- VERSION = '1.12.0'
5
+ VERSION = '1.14.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-cloud-connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikola Milojevic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-05-09 00:00:00.000000000 Z
11
+ date: 2025-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -128,6 +128,7 @@ files:
128
128
  - config/unit_primitives/ask_merge_request.yml
129
129
  - config/unit_primitives/categorize_duo_chat_question.yml
130
130
  - config/unit_primitives/code_suggestions.yml
131
+ - config/unit_primitives/codebase_search.yml
131
132
  - config/unit_primitives/complete_code.yml
132
133
  - config/unit_primitives/description_composer.yml
133
134
  - config/unit_primitives/documentation_search.yml
@@ -139,6 +140,7 @@ files:
139
140
  - config/unit_primitives/generate_code.yml
140
141
  - config/unit_primitives/generate_commit_message.yml
141
142
  - config/unit_primitives/generate_cube_query.yml
143
+ - config/unit_primitives/generate_embeddings_codebase.yml
142
144
  - config/unit_primitives/generate_issue_description.yml
143
145
  - config/unit_primitives/glab_ask_git_command.yml
144
146
  - config/unit_primitives/include_dependency_context.yml