ollama_chat 0.0.39 → 0.0.40
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 +4 -4
- data/CHANGES.md +8 -0
- data/lib/ollama_chat/version.rb +1 -1
- data/lib/ollama_chat/vim.rb +26 -12
- data/ollama_chat.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd56f9c3db76f0f261f6e75863e8c26276d3271cffdc7f1053e6a447922459bb
|
|
4
|
+
data.tar.gz: 3d8330fecf97e96fb63a9e6efaff6c34849c98ef0508bcf06385940701f1418d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7733d610b5962b9636a4fa2e4e38307923295dde7e11dddd7ae9063469cdbad19aefaec8b4775ab81ca4444a4c79f874c861fc16676d67b501dccff5a673736
|
|
7
|
+
data.tar.gz: 2b668abbc41bb56afc4590fff58f54fd66aa927a8ffc2761d3e9bdaff4e3bc20bbf8ec04d9ed7fb2fa47e3e31463e77e6dc6bca69a6f8188f15f691cd76ca986
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2025-11-20 v0.0.40
|
|
4
|
+
|
|
5
|
+
- Improved Vim server name generation to ensure uniqueness by replacing
|
|
6
|
+
`Pathname.pwd.to_s.upcase` with `File.basename` and `Digest::MD5.hexdigest`
|
|
7
|
+
- Modified `default_server_name` method to create server names in the format
|
|
8
|
+
`MYAPP-3F2B4D8A` instead of just `MYAPP`
|
|
9
|
+
- Enhanced documentation for `OllamaChat::Vim#initialize` and `OllamaChat::Vim.default_server_name` methods
|
|
10
|
+
|
|
3
11
|
## 2025-11-14 v0.0.39
|
|
4
12
|
|
|
5
13
|
- Updated `tins` dependency version from `~> 1.41` to `~> 1.47` in `Rakefile` and `ollama_chat.gemspec`
|
data/lib/ollama_chat/version.rb
CHANGED
data/lib/ollama_chat/vim.rb
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
require 'tempfile'
|
|
2
|
-
require 'pathname'
|
|
3
2
|
|
|
4
3
|
# A class that provides functionality for inserting text into Vim buffers via
|
|
5
4
|
# remote communication.
|
|
@@ -11,23 +10,38 @@ class OllamaChat::Vim
|
|
|
11
10
|
# Initializes a new Vim server connection
|
|
12
11
|
#
|
|
13
12
|
# Creates a new OllamaChat::Vim instance for interacting with a specific Vim
|
|
14
|
-
# server. If no server name is provided, it
|
|
15
|
-
# working directory
|
|
13
|
+
# server. If no server name is provided, it derives a standardized server
|
|
14
|
+
# name based on the current working directory using the default_server_name
|
|
15
|
+
# method.
|
|
16
16
|
#
|
|
17
17
|
# @param server_name [String, nil] The name of the Vim server to connect to.
|
|
18
|
-
#
|
|
19
|
-
#
|
|
18
|
+
# If nil or empty, defaults to a server name derived from the current working
|
|
19
|
+
# directory using {default_server_name}
|
|
20
|
+
# @return [OllamaChat::Vim] A new Vim instance configured with the specified
|
|
21
|
+
# server name
|
|
20
22
|
def initialize(server_name)
|
|
21
|
-
server_name.full? or server_name = default_server_name
|
|
23
|
+
server_name.full? or server_name = self.class.default_server_name
|
|
22
24
|
@server_name = server_name
|
|
23
25
|
end
|
|
24
26
|
|
|
25
|
-
# The
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
# The default_server_name method generates a standardized server name
|
|
28
|
+
# based on a given name or the current working directory.
|
|
29
|
+
#
|
|
30
|
+
# This method creates a unique server identifier by combining the basename
|
|
31
|
+
# of the provided name (or current working directory) with a truncated
|
|
32
|
+
# MD5 hash digest of the full path. The resulting name is converted to
|
|
33
|
+
# uppercase for consistent formatting.
|
|
34
|
+
#
|
|
35
|
+
# @param name [ String ] the base name to use for server identification
|
|
36
|
+
# defaults to the current working directory
|
|
37
|
+
#
|
|
38
|
+
# @return [ String ] a formatted server name suitable for use with Vim
|
|
39
|
+
# server connections
|
|
40
|
+
def self.default_server_name(name = Dir.pwd)
|
|
41
|
+
prefix = File.basename(name)
|
|
42
|
+
suffix = Digest::MD5.hexdigest(name)[0, 8]
|
|
43
|
+
name = [ prefix, suffix ] * ?-
|
|
44
|
+
name.upcase
|
|
31
45
|
end
|
|
32
46
|
|
|
33
47
|
# Inserts text at the current cursor position in Vim
|
data/ollama_chat.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: ollama_chat 0.0.
|
|
2
|
+
# stub: ollama_chat 0.0.40 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "ollama_chat".freeze
|
|
6
|
-
s.version = "0.0.
|
|
6
|
+
s.version = "0.0.40".freeze
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.require_paths = ["lib".freeze]
|