Skip to content

Commit

Permalink
fix: add name as agent parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mchitre committed Feb 22, 2024
1 parent 8e815c1 commit 75a7b98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/container.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,7 @@ params(a::Agent) = Pair{String,Symbol}[]
params(a::Agent, ndx) = Pair{String,Symbol}[]

Fjage.get(a::Agent, ::Val{:type}) = string(typeof(a))
Fjage.get(a::Agent, ::Val{:name}) = string(AgentID(a))
Fjage.get(a::Agent, ::Val{:title}) = string(AgentID(a))
Fjage.get(a::Agent, ::Val{:description}) = ""

Expand Down Expand Up @@ -2077,6 +2078,7 @@ end

function _resolve(plist, p, ndx)
psym = Symbol(p)
psym === :name && return p, psym
psym === :type && return p, psym
psym === :title && return p, psym
psym === :description && return p, psym
Expand Down
1 change: 1 addition & 0 deletions src/msg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ function Base.println(io::IO, p::ParameterRsp)
ro = p.readonly === nothing ? String[] : p.readonly
for (k, v) plist
k === ".type" && continue
k === ".name" && continue
k === ".title" && continue
k === ".description" && continue
ks = split(k, '.')
Expand Down

0 comments on commit 75a7b98

Please sign in to comment.