Changeset View
Changeset View
Standalone View
Standalone View
src/toolset/ArcanistPromptResponse.php
Show All 10 Lines | public static function newFromConfig($map) { | ||||
PhutilTypeSpec::checkMap( | PhutilTypeSpec::checkMap( | ||||
$map, | $map, | ||||
array( | array( | ||||
'prompt' => 'string', | 'prompt' => 'string', | ||||
'response' => 'string', | 'response' => 'string', | ||||
)); | )); | ||||
return id(new self()) | return (new self()) | ||||
->setPrompt($map['prompt']) | ->setPrompt($map['prompt']) | ||||
->setResponse($map['response']); | ->setResponse($map['response']); | ||||
} | } | ||||
public function getStorageDictionary() { | public function getStorageDictionary() { | ||||
return array( | return array( | ||||
'prompt' => $this->getPrompt(), | 'prompt' => $this->getPrompt(), | ||||
'response' => $this->getResponse(), | 'response' => $this->getResponse(), | ||||
Show All 32 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0