1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
| { "github.copilot.enable": { "*": true, "yaml": false, "plaintext": false }, "github.copilot.editor.enableAutoCompletions": true, "github.copilot.inlineSuggest.enabled": true,
"tabby.apiEndpoint": "http://localhost:5050", "tabby.completion": { "context": { "includeComments": false, "maxStringLength": 1024 } },
"ai.codingAssistant": { "enabled": true, "providers": ["copilot", "tabby"], "priority": ["tabby", "copilot"], "offlineMode": true },
"files.watcherExclude": { "**/.git/objects/**": true, "**/.git/subtree-cache/**": true, "**/node_modules/**": true, "**/.hg/store/**": true },
"snippets": { "javascript": { "API Call Template": { "prefix": "apicall", "body": [ "try {", "\tconst response = await fetch('${1:url}', {", "\t\tmethod: '${2:GET}',", "\t\theaders: {", "\t\t\t'Content-Type': 'application/json',", "\t\t\t'Authorization': `Bearer ${localStorage.getItem('token')}`", "\t\t},", "\t\t${3:body}", "\t});", "", "\tif (!response.ok) {", "\t\tthrow new Error(`HTTP ${response.status}: ${response.statusText}`);", "\t}", "", "\tconst data = await response.json();", "\tconsole.log('API Response:', data);", "\treturn data;", "} catch (error) {", "\tconsole.error('API Error:', error);", "\tthrow error;", "}" ], "description": "API Call Template with error handling" } } } }
|