MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / addYamlSuffix

Function addYamlSuffix

frontend/src/utils/apiFunctions.js:5–14  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

3const apiUrl = (path) => path
4
5const addYamlSuffix = (filename) => {
6 const trimmed = (filename || '').trim()
7 if (!trimmed) {
8 return ''
9 }
10 if (trimmed.endsWith('.yaml') || trimmed.endsWith('.yml')) {
11 return trimmed
12 }
13 return `${trimmed}.yaml`
14}
15
16// Upload a YAML file
17export async function postYaml(filename, content) {

Callers 5

postYamlFunction · 0.85
updateYamlFunction · 0.85
postYamlNameChangeFunction · 0.85
postYamlCopyFunction · 0.85
fetchYamlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected