migrating the logs file
This commit is contained in:
8
lua/codetyper/utils/estimate_tokens.lua
Normal file
8
lua/codetyper/utils/estimate_tokens.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
--- Estimate token count for a string (rough approximation ~4 chars per token)
|
||||
---@param text string
|
||||
---@return number
|
||||
local function estimate_tokens(text)
|
||||
return math.ceil(#text / 4)
|
||||
end
|
||||
|
||||
return estimate_tokens
|
||||
7
lua/codetyper/utils/get_timestamp.lua
Normal file
7
lua/codetyper/utils/get_timestamp.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
--- Get current timestamp formatted as HH:MM:SS
|
||||
---@return string
|
||||
local function get_timestamp()
|
||||
return os.date("%H:%M:%S")
|
||||
end
|
||||
|
||||
return get_timestamp
|
||||
Reference in New Issue
Block a user